aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grumpy/webapp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/grumpy/webapp.py b/grumpy/webapp.py
index 68bb96f..dfb7972 100644
--- a/grumpy/webapp.py
+++ b/grumpy/webapp.py
@@ -112,16 +112,19 @@ def create_account():
db.session.commit()
send_email(email, u'Gentoo Grumpy registration confirmation', \
render_template('email/registration.txt', user=user))
- flash(u'Profile successfully created')
+ flash(u'Account successfully created')
return redirect(oid.get_next_url())
return render_template('create_account.html', next=oid.get_next_url())
-@app.route('/confirm-profile/<email>/')
+@app.route('/confirm-account/<email>/')
def confirm_account(email):
user = User.query.filter_by(email=email).first()
if not user:
flash(u'Invalid email: "%s"' % email)
return redirect(url_for('index'))
+ if user.regtoken is None:
+ flash(u'Account been already confirmed')
+ return redirect(url_for('index'))
if user.regtoken != request.args.get('token'):
flash(u'Invalid token specified')
return render_template('confirm_account.html', success=False)