Prevent double confirmations from happening (#1253)

* Prevents user from confirming their account twice
bulk-clear-sessions 2.3.1
Kevin Chung 2020-02-17 21:46:24 -05:00 committed by GitHub
parent 7cd8d90e0c
commit 0bae69bee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ def confirm(data=None):
)
user = Users.query.filter_by(email=user_email).first_or_404()
if user.verified:
return redirect(url_for("views.settings"))
user.verified = True
log(
"registrations",