mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
Flush password reset token when email changes
This commit is contained in:
parent
4f09d954e5
commit
be2c2598c7
2 changed files with 5 additions and 1 deletions
|
@ -213,6 +213,7 @@ post '/settings/change_email' do
|
|||
parent_site.email = params[:email]
|
||||
parent_site.email_confirmation_token = SecureRandom.hex 3
|
||||
parent_site.email_confirmed = false
|
||||
parent_site.password_reset_token = nil
|
||||
|
||||
if parent_site.valid?
|
||||
parent_site.save_changes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue