def update_account_details():
	# additional details (if from gateway)
	if webnotes.form_dict.get('is_trial'):
		webnotes.conn.set_global('is_trial', cint(webnotes.form_dict.get('is_trial')))

	if webnotes.form_dict.get('days_to_expiry'):
		webnotes.conn.set_global('days_to_expiry', webnotes.form_dict.get('days_to_expiry'))

	if webnotes.form_dict.get('first_name'):
		from server_tools.gateway_utils import update_user_details
		update_user_details()
Esempio n. 2
0
def update_account_details():
	# additional details (if from gateway)
	if webnotes.form_dict.get('is_trial'):
		webnotes.conn.set_global('is_trial', cint(webnotes.form_dict.get('is_trial')))

	if webnotes.form_dict.get('days_to_expiry'):
		webnotes.conn.set_global('days_to_expiry', webnotes.form_dict.get('days_to_expiry'))

	if webnotes.form_dict.get('first_name'):
		from server_tools.gateway_utils import update_user_details
		update_user_details()

	if webnotes.form_dict.get('xpassword') and webnotes.form_dict.get('login_as')!='Administrator':
		webnotes.conn.sql("""update tabProfile set password=password(%(xpassword)s) where name=%(login_as)s""", (webnotes.form_dict))

	if webnotes.form_dict.get('url_name'):
		from webnotes.utils import set_default
		set_default('account_url', 'http://'+webnotes.form_dict.get('url_name'))
Esempio n. 3
0
def update_account_details():
    # additional details (if from gateway)
    if webnotes.form_dict.get('is_trial'):
        webnotes.conn.set_global('is_trial',
                                 cint(webnotes.form_dict.get('is_trial')))

    if webnotes.form_dict.get('days_to_expiry'):
        webnotes.conn.set_global('days_to_expiry',
                                 webnotes.form_dict.get('days_to_expiry'))

    if webnotes.form_dict.get('first_name'):
        from server_tools.gateway_utils import update_user_details
        update_user_details()

    if webnotes.form_dict.get('xpassword') and webnotes.form_dict.get(
            'login_as') != 'Administrator':
        webnotes.conn.sql(
            """update tabProfile set password=password(%(xpassword)s) where name=%(login_as)s""",
            (webnotes.form_dict))

    if webnotes.form_dict.get('url_name'):
        from webnotes.utils import set_default
        set_default('account_url',
                    'http://' + webnotes.form_dict.get('url_name'))