summaryrefslogtreecommitdiffstats
path: root/app/models/user_preference.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-13 16:38:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-13 16:38:08 +0000
commit10ed306b1935834afa1aad304f1ee5c21cc807d1 (patch)
tree5edcd6a4384969296e803df80870647d45184706 /app/models/user_preference.rb
parent0dce4761a868eafaf216bf83e41860bf841926d8 (diff)
downloadredmine-10ed306b1935834afa1aad304f1ee5c21cc807d1.tar.gz
redmine-10ed306b1935834afa1aad304f1ee5c21cc807d1.zip
Fixed that locking and unlocking a user resets the email notification checkbox (#14020).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11839 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 56cbe763a..37d114ab5 100644
--- a/app/models/user_preference.rb
+++ b/app/models/user_preference.rb
@@ -56,4 +56,7 @@ class UserPreference < ActiveRecord::Base
def warn_on_leaving_unsaved; self[:warn_on_leaving_unsaved] || '1'; end
def warn_on_leaving_unsaved=(value); self[:warn_on_leaving_unsaved]=value; end
+
+ def no_self_notified; (self[:no_self_notified] == true || self[:no_self_notified] == '1'); end
+ def no_self_notified=(value); self[:no_self_notified]=value; end
end