diff options
author | David Gageot <david@gageot.net> | 2012-07-17 17:38:07 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-07-17 17:38:07 +0200 |
commit | 57c924f81ad80dee08a3b14777db9cfb0f7ec63d (patch) | |
tree | fc8da6005f63afd80b0f8da126e87c855bde6ec4 | |
parent | 81d6e63471746864fea2d05bb15186c0ad37dbfd (diff) | |
download | sonarqube-57c924f81ad80dee08a3b14777db9cfb0f7ec63d.tar.gz sonarqube-57c924f81ad80dee08a3b14777db9cfb0f7ec63d.zip |
FIX SONAR-3667 Unable to change user password
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb index a187754727c..1e4fe52d4cd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb @@ -94,8 +94,10 @@ class UsersController < ApplicationController redirect_to(:action => 'change_password', :id => params[:id]) elsif user.update_attributes(:password => params[:user][:password], :password_confirmation => params[:user][:password_confirmation]) flash[:notice] = 'Password was successfully updated.' - else to_index(user.errors, nil) + else + flash[:error] = user.errors.full_messages.join("<br/>\n") + redirect_to(:action => 'change_password', :id => params[:id]) end end |