Fixes in load sessions
This commit is contained in:
parent
da87f4ca60
commit
583baee470
2 changed files with 2 additions and 4 deletions
|
|
@ -46,7 +46,7 @@ def start():
|
||||||
|
|
||||||
lang_p=re.compile("I18n\.lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
lang_p=re.compile("I18n\.lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
||||||
#lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)\}")
|
#lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)\}")
|
||||||
lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
lang_t=re.compile("lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)")
|
||||||
|
|
||||||
if not os.path.isdir(path):
|
if not os.path.isdir(path):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -273,8 +273,6 @@ def login():
|
||||||
|
|
||||||
if user_admin.fields['password'].verify(password, arr_user['password']):
|
if user_admin.fields['password'].verify(password, arr_user['password']):
|
||||||
|
|
||||||
generate_session()
|
|
||||||
|
|
||||||
s=get_session()
|
s=get_session()
|
||||||
|
|
||||||
s['id']=arr_user['id']
|
s['id']=arr_user['id']
|
||||||
|
|
@ -305,7 +303,7 @@ def login():
|
||||||
|
|
||||||
if user_admin.update({'token_login': random_text}):
|
if user_admin.update({'token_login': random_text}):
|
||||||
|
|
||||||
response.set_cookie('remember_login', random_text, path="/", expires=timestamp, secret=key_encrypt)
|
response.set_cookie('remember_login', random_text, path=config.session_opts['session.path'], expires=timestamp, secret=key_encrypt)
|
||||||
#else:
|
#else:
|
||||||
#print(user_admin.query_error)
|
#print(user_admin.query_error)
|
||||||
s.save()
|
s.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue