diff options
author | Andrew Dolgov <[email protected]> | 2005-11-18 08:54:35 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-18 08:54:35 +0100 |
commit | 203b6d25e538093694c83dd6d9d6de6f2366d157 (patch) | |
tree | 69a0f0e5c5072a7ceefc0a39d0c482cd59e287f7 /functions.php | |
parent | d9a94634adf6497579636646e601902afacbf800 (diff) |
store access level in $_SESSION
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 3198c4970..9841f95c9 100644 --- a/functions.php +++ b/functions.php @@ -520,12 +520,13 @@ $pwd_hash = 'SHA1:' . sha1($password); - $result = db_query($link, "SELECT id,login FROM ttrss_users WHERE + $result = db_query($link, "SELECT id,login,access_level FROM ttrss_users WHERE login = '$login' AND (pwd_hash = '$password' OR pwd_hash = '$pwd_hash')"); if (db_num_rows($result) == 1) { $_SESSION["uid"] = db_fetch_result($result, 0, "id"); $_SESSION["name"] = db_fetch_result($result, 0, "login"); + $_SESSION["access_level"] = db_fetch_result($result, 0, "access_level"); return true; } |