Изменение содержимого сессии при авторизации

This commit is contained in:
2024-12-03 17:44:23 +03:00
parent 0d2a5ff959
commit 453801f2e9
2 changed files with 2 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ def auth():
auth_data = auth_model(data)
if auth_data.status:
session.update({
'user_id': auth_data.result[0]['user_ID'],
'login': auth_data.result[0]['login'],
'access_user': data['access'],
'role': auth_data.result[0]['user_role'],

View File

@@ -1,4 +1,4 @@
SELECT login, user_role FROM $access
SELECT user_ID, login, user_role FROM $access
WHERE login = '$login'
AND password = '$password'
LIMIT 1;