blob: 9700495fd33234b86e229fcbd657d2d8c9b38f35 [file] [log] [blame]
Anand Doshi486f9df2012-07-19 13:40:31 +05301from __future__ import unicode_literals
Rushabh Mehta2d7cb222012-07-13 15:07:07 +05302import webnotes
3def execute():
4 webnotes.conn.commit()
5
6 from webnotes.install_lib.install import Installer
7 Installer(None, None).create_auth_table()
8
9 webnotes.conn.begin()
10
11 for user, password in webnotes.conn.sql("""select name, password from tabProfile"""):
Rushabh Mehta49dc5da2012-08-03 16:02:24 +053012 if password:
13 webnotes.conn.sql("""insert into __Auth (user, `password`) values (%s, %s)""",
14 (user, password))