|
|
@ -119,6 +119,7 @@ def user_password(user_email):
|
|
|
|
if form.pw.data != form.pw2.data:
|
|
|
|
if form.pw.data != form.pw2.data:
|
|
|
|
flask.flash('Passwords do not match', 'error')
|
|
|
|
flask.flash('Passwords do not match', 'error')
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
flask.session.regenerate()
|
|
|
|
user.set_password(form.pw.data)
|
|
|
|
user.set_password(form.pw.data)
|
|
|
|
models.db.session.commit()
|
|
|
|
models.db.session.commit()
|
|
|
|
flask.flash('Password updated for %s' % user)
|
|
|
|
flask.flash('Password updated for %s' % user)
|
|
|
@ -186,6 +187,7 @@ def user_signup(domain_name=None):
|
|
|
|
if domain.has_email(form.localpart.data):
|
|
|
|
if domain.has_email(form.localpart.data):
|
|
|
|
flask.flash('Email is already used', 'error')
|
|
|
|
flask.flash('Email is already used', 'error')
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
flask.session.regenerate()
|
|
|
|
user = models.User(domain=domain)
|
|
|
|
user = models.User(domain=domain)
|
|
|
|
form.populate_obj(user)
|
|
|
|
form.populate_obj(user)
|
|
|
|
user.set_password(form.pw.data)
|
|
|
|
user.set_password(form.pw.data)
|
|
|
|