[#10752] set email verified after password reset
This commit is contained in:
parent
9fd53b182a
commit
9e843a3df4
2 changed files with 21 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Users::PasswordsController < Devise::PasswordsController
|
|||
|
||||
after_action :try_to_authenticate_instructeur, only: [:update]
|
||||
after_action :try_to_authenticate_administrateur, only: [:update]
|
||||
after_action :update_email_verified_at, only: [:update]
|
||||
|
||||
# GET /resource/password/new
|
||||
# def new
|
||||
|
@ -62,4 +63,10 @@ class Users::PasswordsController < Devise::PasswordsController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def update_email_verified_at
|
||||
if user_signed_in?
|
||||
current_user.update!(email_verified_at: Time.zone.now)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue