def confirm(token): """Confirm new user's account with provided token.""" if current_user.confirmed: return redirect(url_for('main.index')) if current_user.confirm_account(token): flash('Your account has been confirmed.', 'success') else: flash('The confirmation link is invalid or has expired.', 'error') return redirect(url_for('main.index'))
def confirm(token): """Confirm new user's account with provided token.""" if current_user.confirmed: return redirect(url_for("main.index")) if current_user.confirm_account(token): flash("Your account has been confirmed.", "success") else: flash("The confirmation link is invalid or has expired.", "error") return redirect(url_for("main.index"))
def confirm(token): """Confirm new user's account with provided token.""" if current_user.confirmed: return redirect(url_for('main.index')) if current_user.confirm_account(token): flash('계정이 확인되었습니다.', 'success') else: flash('해당 링크의 기한이 지났거나 확인할수 없습니다 다시 시도하여 주십시오.', 'error') return redirect(url_for('main.index'))
def confirm(token): """Confirm new user's account with provided token.""" if current_user.confirmed: return redirect(url_for('main.index')) user = current_user.confirm_account( token) # call rest and reflash user info if user is not None: flash('Your account has been confirmed.', 'success') # reload user info login_user(user) else: flash('The confirmation link is invalid or has expired.', 'error') return redirect(url_for('main.index'))