aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-08-27 15:13:14 -0500
committerzsloan2020-08-27 15:13:14 -0500
commit0b16990d169718d2aab6139c36655e042fb0f234 (patch)
tree7fb6f8a743b9e90f9f0eb7e57bfb7f64fd682d60
parent433b41086d3f61a94778d7b244c0d0276794e59e (diff)
downloadgenenetwork2-0b16990d169718d2aab6139c36655e042fb0f234.tar.gz
Added function for sending an invitation e-mail
* wqflask/wqflask/user_login.py - Added send_invitation_email function, which does what it says
-rw-r--r--wqflask/wqflask/user_login.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/user_login.py b/wqflask/wqflask/user_login.py
index cfee0079..9331f369 100644
--- a/wqflask/wqflask/user_login.py
+++ b/wqflask/wqflask/user_login.py
@@ -139,6 +139,12 @@ def send_verification_email(user_details, template_name = "email/user_verificati
send_email(recipient, subject, body)
return {"recipient": recipient, "subject": subject, "body": body}
+def send_invitation_email(user_email, temp_password, template_name = "email/user_invitation.txt", subject = "You've been added to a GeneNetwork user group"):
+ recipient = user_email
+ body = render_template(template_name, temp_password)
+ send_email(recipient, subject, body)
+ return {"recipient": recipient, "subject": subject, "body": body}
+
@app.route("/manage/verify_email")
def verify_email():
if 'code' in request.args: