diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-05-08 09:07:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-05-08 09:07:37 +0000 |
commit | a9d9fe14f9860dae5400eb39dbe9683bd797a16e (patch) | |
tree | 73620a1734ee1468569c00fe86e50a3f6407eb50 /app/models/mailer.rb | |
parent | 60bb7565dd8460137974bdaa0e25c97907ea6ee7 (diff) | |
download | redmine-a9d9fe14f9860dae5400eb39dbe9683bd797a16e.tar.gz redmine-a9d9fe14f9860dae5400eb39dbe9683bd797a16e.zip |
Don't send a notification to the dummy email address of the default admin account (#21421).
git-svn-id: http://svn.redmine.org/redmine/trunk@15402 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 79f3229e7..fe0279240 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -312,6 +312,11 @@ class Mailer < ActionMailer::Base # Notifies user that his password was updated def self.password_updated(user) + # Don't send a notification to the dummy email address when changing the password + # of the default admin account which is required after the first login + # TODO: maybe not the best way to handle this + return if user.admin? && user.login == 'admin' && user.mail == 'admin@example.net' + Mailer.security_notification(user, message: :mail_body_password_updated, title: :button_change_password, |