fix: reset reset_password_key on password update using link (#9421)

extension to #8982

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay Pai 2020-02-05 18:45:16 +05:30 committed by GitHub
parent 85ee4f1a67
commit 45e69c9723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -564,8 +564,8 @@ def update_password(new_password, logout_all_sessions=0, key=None, old_password=
frappe.local.login_manager.login_as(user)
frappe.db.set_value("User", user,
'last_password_reset_date', today())
frappe.db.set_value("User", user, "last_password_reset_date", today())
frappe.db.set_value("User", user, "reset_password_key", "")
if user_doc.user_type == "System User":
return "/desk"