mirror of
https://github.com/simple-login/app.git
synced 2025-02-25 00:03:03 +08:00
fix cancel email change
This commit is contained in:
parent
8889dc119f
commit
38d9654624
2 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
|||
<span class="text-danger">Pending email change: {{ pending_email }}</span>
|
||||
<a href="{{ url_for('dashboard.resend_email_change') }}" class="btn btn-secondary btn-sm">Resend
|
||||
confirmation email</a>
|
||||
<a href="{{ url_for('dashboard.resend_email_change') }}" class="btn btn-secondary btn-sm">Cancel email
|
||||
<a href="{{ url_for('dashboard.cancel_email_change') }}" class="btn btn-secondary btn-sm">Cancel email
|
||||
change</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -177,6 +177,7 @@ def cancel_email_change():
|
|||
email_change = EmailChange.get_by(user_id=current_user.id)
|
||||
if email_change:
|
||||
EmailChange.delete(email_change.id)
|
||||
db.session.commit()
|
||||
flash("Your email change is cancelled", "success")
|
||||
return redirect(url_for("dashboard.setting"))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue