From b6ed895ed89c5b6d3569c9331e273aa38618287c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 23 Sep 2019 12:33:14 +0530 Subject: [PATCH] =?UTF-8?q?fix(user):=20remove=20password=20update=20notif?= =?UTF-8?q?ication=20feature=20for=20secu=E2=80=A6=20(#8449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frappe/core/doctype/user/user.json | 10 +--------- frappe/core/doctype/user/user.py | 8 -------- frappe/templates/emails/password_update.html | 4 ---- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 frappe/templates/emails/password_update.html diff --git a/frappe/core/doctype/user/user.json b/frappe/core/doctype/user/user.json index 9376c8d0b5..b98935b4f3 100644 --- a/frappe/core/doctype/user/user.json +++ b/frappe/core/doctype/user/user.json @@ -38,7 +38,6 @@ "mute_sounds", "change_password", "new_password", - "send_password_update_notification", "logout_all_sessions", "reset_password_key", "last_password_reset_date", @@ -299,13 +298,6 @@ "label": "Set New Password", "no_copy": 1 }, - { - "default": "0", - "depends_on": "eval:!doc.__islocal", - "fieldname": "send_password_update_notification", - "fieldtype": "Check", - "label": "Send Password Update Notification" - }, { "default": "0", "fieldname": "logout_all_sessions", @@ -593,7 +585,7 @@ "idx": 413, "image_field": "user_image", "max_attachments": 5, - "modified": "2019-08-09 10:34:56.912283", + "modified": "2019-09-18 14:14:01.233124", "modified_by": "Administrator", "module": "Core", "name": "User", diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index cd754aef3a..dcbf3ee35a 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -153,10 +153,6 @@ 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 and self.enabled: - self.password_update_mail(new_password) - frappe.msgprint(_("New password emailed")) - def set_system_user(self): '''Set as System User if any of the given roles has desk_access''' if self.has_desk_access() or self.name == 'Administrator': @@ -250,10 +246,6 @@ class User(Document): self.send_login_mail(_("Password Reset"), "password_reset", {"link": link}, now=True) - def password_update_mail(self, password): - self.send_login_mail(_("Password Update"), - "password_update", {"new_password": password}, now=True) - def send_welcome_mail_to_user(self): from frappe.utils import get_url link = self.reset_password() diff --git a/frappe/templates/emails/password_update.html b/frappe/templates/emails/password_update.html deleted file mode 100644 index 7730526b4d..0000000000 --- a/frappe/templates/emails/password_update.html +++ /dev/null @@ -1,4 +0,0 @@ -

{{_("Dear")}} {{ first_name }}{% if last_name %} {{ last_name}}{% endif %},

-

{{_("Your password has been updated. Here is your new password")}}: {{ new_password }}

-

{{_("Thank you")}},
-{{ user_fullname }}

\ No newline at end of file