Flush password reset token when email changes

This commit is contained in:
Kyle Drake 2017-01-25 20:45:00 -08:00
parent 4f09d954e5
commit be2c2598c7
2 changed files with 5 additions and 1 deletions

View file

@ -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