aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2018-04-04 17:10:14 +0000
committerPjotr Prins2018-04-04 17:10:14 +0000
commit273c72ef02f839b88b3d2ad504e9d84eab0f9ec5 (patch)
treefe4704e1de9d2382568a965ab2e0057911cc83e1 /wqflask
parent8145507d6d617554cf996e6cebf286d30ae64df0 (diff)
downloadgenenetwork2-273c72ef02f839b88b3d2ad504e9d84eab0f9ec5.tar.gz
Authentication: comments added
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/user_manager.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py
index ead919fc..5f6c818e 100644
--- a/wqflask/wqflask/user_manager.py
+++ b/wqflask/wqflask/user_manager.py
@@ -424,6 +424,7 @@ def verify_email():
@app.route("/n/password_reset", methods=['GET'])
def password_reset():
+ """Entry point after user clicks link in E-mail"""
logger.debug("in password_reset request.url is:", request.url)
# We do this mainly just to assert that it's in proper form for displaying next page
# Really not necessary but doesn't hurt
@@ -454,6 +455,7 @@ def password_reset():
@app.route("/n/password_reset_step2", methods=('POST',))
def password_reset_step2():
+ """Handle confirmation E-mail for password reset"""
logger.debug("in password_reset request.url is:", request.url)
errors = []
@@ -650,8 +652,6 @@ class LoginUser(object):
VerificationEmail(user)
return render_template("new_security/verification_still_needed.html",
subject=VerificationEmail.subject)
-
-
if valid:
if params.get('remember'):
logger.debug("I will remember you")
@@ -729,12 +729,15 @@ def logout():
@app.route("/n/forgot_password")
def forgot_password():
+ """Entry point for forgotten password"""
return render_template("new_security/forgot_password.html")
@app.route("/n/forgot_password_submit", methods=('POST',))
def forgot_password_submit():
+ """When a forgotten password form is submitted we get here"""
params = request.form
email_address = params['email_address']
+ logger.debug("Wants to send password E-mail to ",email_address)
es = get_elasticsearch_connection()
user_details = get_user_by_unique_column(es, "email_address", email_address)
if user_details: