Commit 2808937d71744112577f31ecae7efbf46275bc66

Authored by Rodrigo Souto
1 parent 08b30ebf

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 130 if request.post?
131 131 @user = current_user
132 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 139 end
140 140 end
141 141 end
... ...