summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-03 08:57:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-03-03 08:57:00 +0000
commitf77ed4a7c30d989be8a95d11ee120422ff178ee1 (patch)
tree42fb70f54253123a07b5ac96ba0a9107d70e4d2a /app
parent6cffab991911a87181b3fb54081e1d9a35f6e8d8 (diff)
downloadredmine-f77ed4a7c30d989be8a95d11ee120422ff178ee1.tar.gz
redmine-f77ed4a7c30d989be8a95d11ee120422ff178ee1.zip
Mail handler: adds --no-notification option to disable notifications to the created user (#13341).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11526 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/mail_handler.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 43e656d86..edbbe406b 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -39,6 +39,7 @@ class MailHandler < ActionMailer::Base
@@handler_options[:allow_override] << 'status' unless @@handler_options[:issue].has_key?(:status)
@@handler_options[:no_account_notice] = (@@handler_options[:no_account_notice].to_s == '1')
+ @@handler_options[:no_notification] = (@@handler_options[:no_notification].to_s == '1')
@@handler_options[:no_permission_check] = (@@handler_options[:no_permission_check].to_s == '1')
email.force_encoding('ASCII-8BIT') if email.respond_to?(:force_encoding)
@@ -455,6 +456,9 @@ class MailHandler < ActionMailer::Base
end
if addr.present?
user = self.class.new_user_from_attributes(addr, name)
+ if @@handler_options[:no_notification]
+ user.mail_notification = 'none'
+ end
if user.save
user
else