mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
when email changes, verify new email #78
This commit is contained in:
parent
02381c094b
commit
b435423b1e
1 changed files with 2 additions and 4 deletions
|
@ -114,10 +114,8 @@ def edit_profile(actor):
|
|||
current_user.verified = False
|
||||
verification_token = random_token(16)
|
||||
current_user.verification_token = verification_token
|
||||
send_verification_email(user)
|
||||
flash(
|
||||
_('You have changed your email address so we need to verify it. Please check your email inbox for a verification link.'),
|
||||
'warning')
|
||||
send_verification_email(current_user)
|
||||
flash(_('You have changed your email address so we need to verify it. Please check your email inbox for a verification link.'), 'warning')
|
||||
current_user.email = form.email.data.strip()
|
||||
if form.password_field.data.strip() != '':
|
||||
current_user.set_password(form.password_field.data)
|
||||
|
|
Loading…
Add table
Reference in a new issue