updated verify logic to accomedate confirmed users who forgot their discord access token
This commit is contained in:
@@ -100,8 +100,11 @@ def verify_email(token):
|
|||||||
user = Participant.query.filter_by(email=email).first_or_404()
|
user = Participant.query.filter_by(email=email).first_or_404()
|
||||||
|
|
||||||
if get_confirmed_count() >= current_app.config['MAX_SPOTS']:
|
if get_confirmed_count() >= current_app.config['MAX_SPOTS']:
|
||||||
|
if user.confirmed:
|
||||||
|
return render_template('success.html', message="You are confirmed", discord_link=current_app.config['DISCORD_LINK'], discord_token=user.discord_token)
|
||||||
|
else:
|
||||||
return render_template("error.html", error_message="Sorry! The event filled up while you were verifying.")
|
return render_template("error.html", error_message="Sorry! The event filled up while you were verifying.")
|
||||||
|
else:
|
||||||
user.confirmed = True
|
user.confirmed = True
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user