Merge pull request #7712 from deepeshgarg007/user-fix-develop

fix: Do not send password update notification to disabled users
This commit is contained in:
Rushabh Mehta 2019-06-20 14:16:26 +05:30 committed by GitHub
commit dc93ff8be3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,7 @@ class User(Document):
if new_password and not self.flags.in_insert:
_update_password(user=self.name, pwd=new_password, logout_all_sessions=self.logout_all_sessions)
if self.send_password_update_notification:
if self.send_password_update_notification and self.enabled:
self.password_update_mail(new_password)
frappe.msgprint(_("New password emailed"))