summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2016-01-07 04:16:44 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2016-01-07 04:16:44 +0000
commitcd63df3b26f1443ab399323a26c9996b45b0945a (patch)
treea41ec40d82829f83bc50a104cb707bf98b3b462c /app/models
parentb7a06818fc5545e997c5a541abc069f75d8802bf (diff)
downloadredmine-cd63df3b26f1443ab399323a26c9996b45b0945a.tar.gz
redmine-cd63df3b26f1443ab399323a26c9996b45b0945a.zip
Merged r14974 and r14975 from trunk to 3.2-stable (#21447)
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15009 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-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 80b3e6b9d..6e7876abb 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -25,6 +25,9 @@ class UserPreference < ActiveRecord::Base
def initialize(attributes=nil, *args)
super
+ if new_record? && !(attributes && attributes.key?(:hide_mail))
+ self.hide_mail = Setting.default_users_hide_mail?
+ end
self.others ||= {}
end