From cd63df3b26f1443ab399323a26c9996b45b0945a Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 7 Jan 2016 04:16:44 +0000 Subject: 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 --- app/models/user_preference.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models') 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 -- cgit v1.2.3