[fix] Setup Wizard - the case of forgetting mute emails
This commit is contained in:
parent
9d5b84e78a
commit
888a70c2d4
@ -109,7 +109,8 @@ def setup_account(args=None):
|
|||||||
def update_user_name(args):
|
def update_user_name(args):
|
||||||
if args.get("email"):
|
if args.get("email"):
|
||||||
args['name'] = args.get("email")
|
args['name'] = args.get("email")
|
||||||
frappe.flags.mute_emails = True
|
|
||||||
|
_mute_emails, frappe.flags.mute_emails = frappe.flags.mute_emails, True
|
||||||
doc = frappe.get_doc({
|
doc = frappe.get_doc({
|
||||||
"doctype":"User",
|
"doctype":"User",
|
||||||
"email": args.get("email"),
|
"email": args.get("email"),
|
||||||
@ -118,7 +119,7 @@ def update_user_name(args):
|
|||||||
})
|
})
|
||||||
doc.flags.no_welcome_mail = True
|
doc.flags.no_welcome_mail = True
|
||||||
doc.insert()
|
doc.insert()
|
||||||
frappe.flags.mute_emails = False
|
frappe.flags.mute_emails = _mute_emails
|
||||||
from frappe.auth import _update_password
|
from frappe.auth import _update_password
|
||||||
_update_password(args.get("email"), args.get("password"))
|
_update_password(args.get("email"), args.get("password"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user