New-password endpoints are implemented.

There should be a better way to validate the token.
This commit is contained in:
Rebecca Law
2016-01-06 17:37:07 +00:00
parent f94966154d
commit b5901a1ac7
9 changed files with 104 additions and 36 deletions

View File

@@ -10,7 +10,8 @@ from app.main.views import send_change_password_email
def forgot_password():
form = ForgotPasswordForm(users_dao.find_all_email_address())
if form.validate_on_submit():
send_change_password_email(form.email_address.data)
user = users_dao.get_user_by_email(form.email_address.data)
send_change_password_email(form.email_address.data, user.id)
return render_template('views/password-reset-sent.html')
else:
return render_template('views/forgot-password.html', form=form)