in create profile, set password in auth table

This commit is contained in:
Anand Doshi 2012-10-01 20:44:54 +05:30
parent beb3a872ce
commit 769392eee9

View File

@ -231,7 +231,8 @@ class DocType:
pr.name = pr.email = user_email
pr.enabled = 1
pr.save(1)
if pwd: webnotes.conn.sql("UPDATE `tabProfile` SET password=PASSWORD(%s) WHERE name=%s", (pwd, user_email))
if pwd:
webnotes.conn.sql("UPDATE `__Auth` SET password=PASSWORD(%s) WHERE user=%s", (pwd, user_email))
self.add_roles(pr)
def add_roles(self, pr):