]> source.dussan.org Git - redmine.git/commitdiff
Don't send a notification to the dummy email address of the default admin account...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 8 May 2016 09:07:37 +0000 (09:07 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 8 May 2016 09:07:37 +0000 (09:07 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15402 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mailer.rb

index 79f3229e74191f80d33fd399c3d3877d0b2d18ee..fe0279240bbe8e948bac240397e1a476783cfa89 100644 (file)
@@ -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,