Commit 2808937d71744112577f31ecae7efbf46275bc66
1 parent
08b30ebf
Exists in
staging
and in
42 other branches
change-password: rescue any exception
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
app/controllers/public/account_controller.rb
@@ -130,12 +130,12 @@ class AccountController < ApplicationController | @@ -130,12 +130,12 @@ class AccountController < ApplicationController | ||
130 | if request.post? | 130 | if request.post? |
131 | @user = current_user | 131 | @user = current_user |
132 | begin | 132 | begin |
133 | - @user.change_password!(params[:current_password], | ||
134 | - params[:new_password], | ||
135 | - params[:new_password_confirmation]) | ||
136 | - session[:notice] = _('Your password has been changed successfully!') | ||
137 | - redirect_to :action => 'index' | ||
138 | - rescue | 133 | + @user.change_password!(params[:current_password], |
134 | + params[:new_password], | ||
135 | + params[:new_password_confirmation]) | ||
136 | + session[:notice] = _('Your password has been changed successfully!') | ||
137 | + redirect_to :action => 'index' | ||
138 | + rescue Exception | ||
139 | end | 139 | end |
140 | end | 140 | end |
141 | end | 141 | end |