summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2013-04-16 01:16:39 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-04-16 01:18:47 +0200
commite184d4b05bfc162f310655f98c441198c457c9b7 (patch)
treebb51afde1a06f1ed8a628ad429b6e67c1a395f14
parent34daf006a422306c9b06f45fe757e5f0ba3dd248 (diff)
downloadweb-e184d4b05bfc162f310655f98c441198c457c9b7.tar.gz
web-e184d4b05bfc162f310655f98c441198c457c9b7.tar.bz2
web-e184d4b05bfc162f310655f98c441198c457c9b7.zip
mail is now an attribute
-rw-r--r--app.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.py b/app.py
index 6419571..edb0fb5 100644
--- a/app.py
+++ b/app.py
@@ -145,7 +145,7 @@ def lost_password():
body = render_template('mail/lost_password.txt', username=form.user.uid,
link=confirm_link)
- send_mail(form.user.mail, u'Passwort vergessen', body,
+ send_mail(form.user.attributes['mail'], u'Passwort vergessen', body,
sender=app.config.get('MAIL_CONFIRM_SENDER'))
flash(u'Wir haben dir eine E-Mail mit einem Link zum Passwort ändern '
@@ -185,7 +185,7 @@ def lost_password_complete(token):
@templated('settings.html')
@login_required
def settings():
- form = SettingsForm(request.form, mail=g.user.mail)
+ form = SettingsForm(request.form, mail=g.user.attributes['mail'])
if request.method == 'POST' and form.validate():
changed = False
@@ -197,7 +197,7 @@ def settings():
changed = True
elif request.form.get('submit_main'):
- if form.mail.data and form.mail.data != g.user.mail:
+ if form.mail.data and form.mail.data != g.user.attributes['mail']:
confirm_token = make_confirmation('change_mail', (g.user.uid, form.mail.data))
confirm_link = url_for('change_mail', token=confirm_token, _external=True)