aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb4
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