diff options
Diffstat (limited to 'app/models/user_preference.rb')
-rw-r--r-- | app/models/user_preference.rb | 3 |
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 |