summaryrefslogtreecommitdiffstats
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-12-06 20:46:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-12-06 20:46:26 +0000
commit389527296e02ab5ae205e22a9544589f6121b64d (patch)
tree23b7031903bc5c070d8ee9476c53efa7f4e500ec /app/controllers/users_controller.rb
parente6b7c7316977596fa4970d85c580b23263bdbec8 (diff)
downloadredmine-389527296e02ab5ae205e22a9544589f6121b64d.tar.gz
redmine-389527296e02ab5ae205e22a9544589f6121b64d.zip
Prevent admins from sending themselves their own password (#21436).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@14966 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 9ce80111a..33699325b 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -143,7 +143,7 @@ class UsersController < ApplicationController
if was_activated
Mailer.account_activated(@user).deliver
- elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil?
+ elsif @user.active? && params[:send_information] && @user.password.present? && @user.auth_source_id.nil? && @user != User.current
Mailer.account_information(@user, @user.password).deliver
end