Handle duplicate emails on confirmation and make the confirmation error page nicer
This commit is contained in:
parent
bd5ebe070b
commit
c738113ca4
3 changed files with 26 additions and 3 deletions
|
@ -259,8 +259,8 @@ def confirm_email():
|
|||
try:
|
||||
result = model.confirm_user_email(code)
|
||||
except model.DataModelException as ex:
|
||||
return redirect(url_for('signin'))
|
||||
|
||||
return render_page_template('confirmerror.html', error_message=ex.message)
|
||||
|
||||
common_login(result['user'])
|
||||
|
||||
return redirect(url_for('user', tab='email') if result['new_email'] else url_for('index'))
|
||||
|
|
Reference in a new issue