mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
[wsgi] [minor] fixed flags
This commit is contained in:
@@ -12,7 +12,6 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
|
||||
on_complete: function(wiz) {
|
||||
var values = wiz.get_values();
|
||||
wiz.show_working();
|
||||
console.log(values);
|
||||
wn.call({
|
||||
method: "setup.page.setup_wizard.setup_wizard.setup_account",
|
||||
args: values,
|
||||
@@ -26,7 +25,7 @@ wn.pages['setup-wizard'].onload = function(wrapper) {
|
||||
wiz.show_complete();
|
||||
setTimeout(function() {
|
||||
if(user==="Administrator") {
|
||||
wn.msgprint(wn._("Login with your new User ID") + ":" + values.email);
|
||||
msgprint(wn._("Login with your new User ID") + ":" + values.email);
|
||||
setTimeout(function() {
|
||||
wn.app.logout();
|
||||
}, 2000);
|
||||
|
||||
@@ -35,20 +35,23 @@ def setup_account(args=None):
|
||||
|
||||
webnotes.clear_cache()
|
||||
webnotes.conn.commit()
|
||||
|
||||
# suppress msgprints
|
||||
webnotes.local.message_log = []
|
||||
|
||||
return "okay"
|
||||
|
||||
def update_profile_name(args):
|
||||
if args.get("email_id"):
|
||||
if args.get("email"):
|
||||
args['name'] = args.get("email")
|
||||
webnotes.mute_emails = True
|
||||
webnotes.flags.mute_emails = True
|
||||
webnotes.bean({
|
||||
"doctype":"Profile",
|
||||
"email": args.get("email"),
|
||||
"first_name": args.get("first_name"),
|
||||
"last_name": args.get("last_name")
|
||||
}).insert()
|
||||
webnotes.mute_emails = False
|
||||
webnotes.flags.mute_emails = False
|
||||
from webnotes.auth import _update_password
|
||||
_update_password(args.get("email"), args.get("password"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user