From 57c924f81ad80dee08a3b14777db9cfb0f7ec63d Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 17 Jul 2012 17:38:07 +0200 Subject: [PATCH] FIX SONAR-3667 Unable to change user password --- .../main/webapp/WEB-INF/app/controllers/users_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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("
\n") + redirect_to(:action => 'change_password', :id => params[:id]) end end -- 2.39.5