fixes to gateway path

This commit is contained in:
Rushabh Mehta
2011-07-06 10:42:02 +05:30
parent ab49e027a1
commit cac4473fec
3 changed files with 7 additions and 34 deletions

View File

@@ -2,15 +2,16 @@ import webnotes
from webnotes.utils import load_json, cint, nowdate
#
# change profile (remote)
#
def change_password(arg):
"""
Change password
"""
arg = load_json(arg)
if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
import server_tools.server_tools.gateway_utils
webnotes.msgprint(server_tools.server_tools.gateway_utils.change_password(arg['old_password'], arg['new_password'])['message'])
import server_tools.gateway_utils
webnotes.msgprint(server_tools.gateway_utils.change_password(arg['old_password'], arg['new_password'])['message'])
else:
if not webnotes.conn.sql('select name from tabProfile where name=%s and password=password(%s)', (webnotes.session['user'], arg['old_password'])):
webnotes.msgprint('Old password is not correct', raise_exception=1)