exclude gtix from password reset emails
parent
e5e5402037
commit
0ae54086dd
|
@ -397,14 +397,15 @@ def post_forgot():
|
||||||
if not user.email:
|
if not user.email:
|
||||||
return error("This account doesn't have an email attached.")
|
return error("This account doesn't have an email attached.")
|
||||||
|
|
||||||
now = int(time.time())
|
if user.id != GTIX_ID:
|
||||||
token = generate_hash(f"{user.id}+{now}+forgot+{user.login_nonce}")
|
now = int(time.time())
|
||||||
url = f"{SITE_FULL}/reset?id={user.id}&time={now}&token={token}"
|
token = generate_hash(f"{user.id}+{now}+forgot+{user.login_nonce}")
|
||||||
|
url = f"{SITE_FULL}/reset?id={user.id}&time={now}&token={token}"
|
||||||
|
|
||||||
send_mail(to_address=user.email,
|
send_mail(to_address=user.email,
|
||||||
subject="Password Reset Request",
|
subject="Password Reset Request",
|
||||||
html=render_template("email/password_reset.html", action_url=url, v=user),
|
html=render_template("email/password_reset.html", action_url=url, v=user),
|
||||||
)
|
)
|
||||||
|
|
||||||
return render_template("login/forgot_password.html", msg="An email was sent to you. Please check your spam folder if you can't find it.")
|
return render_template("login/forgot_password.html", msg="An email was sent to you. Please check your spam folder if you can't find it.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue