12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/quo_vadis/passwords_controller.rb', line 12
def update
@password = authenticated_model.qv_account.password
if @password.change(params[:password][:password],
params[:password][:new_password],
params[:password][:new_password_confirmation])
qv.log authenticated_model.qv_account, Log::PASSWORD_CHANGE
QuoVadis.notify :password_change_notification, email: authenticated_model.email
qv.logout_other_sessions
qv.replace_session
redirect_to qv.path_after_password_change, notice: QuoVadis.translate('flash.password.update')
else
render :edit, status: :unprocessable_entity
end
end
|