summaryrefslogtreecommitdiffstats
path: root/app/models/user_preference.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-15 12:52:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-15 12:52:41 +0000
commit6d21b3c4aea80589c3c6bbda2957edf098e10ec9 (patch)
tree971228493415f93621409f1a7c01609da3343f30 /app/models/user_preference.rb
parentdf18ece50437b105091f3e26cfa6748fd45fe12f (diff)
downloadredmine-6d21b3c4aea80589c3c6bbda2957edf098e10ec9.tar.gz
redmine-6d21b3c4aea80589c3c6bbda2957edf098e10ec9.zip
Add default timezone for new users (#16484).
git-svn-id: http://svn.redmine.org/redmine/trunk@16200 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r--app/models/user_preference.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb
index ed6de228b..b2d336a20 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -39,6 +39,9 @@ class UserPreference < ActiveRecord::Base
if new_record? && !(attributes && attributes.key?(:hide_mail))
self.hide_mail = Setting.default_users_hide_mail?
end
+ if new_record? && !(attributes && attributes.key?(:time_zone))
+ self.time_zone = Setting.default_users_time_zone
+ end
if new_record? && !(attributes && attributes.key?(:no_self_notified))
self.no_self_notified = true
end