diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-02-05 07:33:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-02-05 07:33:24 +0000 |
commit | 5d70fce6ce4c481f058fc1b89d567c1389cb7e54 (patch) | |
tree | fe7c5a9602d73ef312b544783efb0ff645bc7f1d /app/controllers/account_controller.rb | |
parent | 40e6a74d4834f171bd8080dce39c587d84fb86da (diff) | |
download | redmine-5d70fce6ce4c481f058fc1b89d567c1389cb7e54.tar.gz redmine-5d70fce6ce4c481f058fc1b89d567c1389cb7e54.zip |
Security notifications when password or email adress is changed (#21421).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@15145 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r-- | app/controllers/account_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index d6c69a3a5..195bae30e 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -73,6 +73,12 @@ class AccountController < ApplicationController @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] if @user.save @token.destroy + Mailer.security_notification(@user, + message: :mail_body_security_notification_change, + field: :field_password, + title: :button_change_password, + url: {controller: 'my', action: 'password'} + ).deliver flash[:notice] = l(:notice_account_password_updated) redirect_to signin_path return |