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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user