2013-08-05 09:29:54 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2012-07-19 08:10:31 +00:00
|
|
|
from __future__ import unicode_literals
|
2012-07-13 09:37:07 +00:00
|
|
|
import webnotes
|
|
|
|
def execute():
|
|
|
|
webnotes.conn.commit()
|
|
|
|
|
|
|
|
from webnotes.install_lib.install import Installer
|
|
|
|
Installer(None, None).create_auth_table()
|
|
|
|
|
|
|
|
webnotes.conn.begin()
|
|
|
|
|
|
|
|
for user, password in webnotes.conn.sql("""select name, password from tabProfile"""):
|
2012-08-03 10:32:24 +00:00
|
|
|
if password:
|
|
|
|
webnotes.conn.sql("""insert into __Auth (user, `password`) values (%s, %s)""",
|
|
|
|
(user, password))
|