Sha256: cc7ed6e0e3b19c851f65d053e87880dce21927b7af044d99b40b0efb256caee6
Contents?: true
Size: 762 Bytes
Versions: 3
Compression:
Stored size: 762 Bytes
Contents
# frozen_string_literal: true module QuoVadis class PasswordsController < ApplicationController before_action :require_authentication def edit @password = QuoVadis::Password.new end def update @password = authenticated_model.qv_account.password if @password.change params[:password], params[:new_password], params[: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 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems