From 2f5998a079e2a4f882c1ea3c1a3ceebca404e3a8 Mon Sep 17 00:00:00 2001 From: Marian Sigler Date: Sat, 29 Sep 2012 17:55:14 +0200 Subject: Make it possible to enter an email address at lost_password. That way users who forgot their username can find it out. --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index eae781f..5998a81 100644 --- a/app.py +++ b/app.py @@ -142,10 +142,10 @@ def lost_password(): if request.method == 'POST' and form.validate(): #TODO: make the link only usable once (e.g include a hash of the old pw) # atm the only thing we do is make the link valid for only little time - confirm_token = make_confirmation('lost_password', (form.username.data,)) + confirm_token = make_confirmation('lost_password', (form.user.uid,)) confirm_link = url_for('lost_password_complete', token=confirm_token, _external=True) - body = render_template('mail/lost_password.txt', username=form.username.data, + body = render_template('mail/lost_password.txt', username=form.user.uid, link=confirm_link) send_mail(form.user.mail, u'Passwort vergessen', body, -- cgit v1.2.3-1-g7c22