fix in change password of profile settings page
diff --git a/erpnext/home/page/profile_settings/profile_settings.py b/erpnext/home/page/profile_settings/profile_settings.py
index 97d286e..0de424f 100644
--- a/erpnext/home/page/profile_settings/profile_settings.py
+++ b/erpnext/home/page/profile_settings/profile_settings.py
@@ -34,11 +34,14 @@
check_demo()
arg = load_json(arg)
- if not webnotes.conn.sql('select name from tabProfile where name=%s and password=password(%s)', (webnotes.session['user'], arg['old_password'])):
+ if not webnotes.conn.sql("""select * from `__Auth` where `user`=%s
+ and password=password(%s)""",
+ (webnotes.session["user"], arg["old_password"])):
webnotes.msgprint('Old password is not correct', raise_exception=1)
-
- from webnotes.utils import nowdate
- webnotes.conn.sql("update tabProfile set password=password(%s), modified=%s where name=%s",(arg['new_password'], nowdate(), webnotes.session['user']))
+
+ webnotes.conn.sql("""update `__Auth` set password=password(%s)
+ where `user`=%s""", (arg["new_password"], webnotes.session["user"]))
+
webnotes.msgprint('Password Updated');
@webnotes.whitelist()