]> git.wh0rd.org Git - tt-rss.git/commitdiff
store access level in $_SESSION
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Nov 2005 07:54:35 +0000 (08:54 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 18 Nov 2005 07:54:35 +0000 (08:54 +0100)
functions.php

index 3198c49708bd535612f40b65d06d1498d3c1554e..9841f95c9f1f0cc037c2368f4b543f99157a2311 100644 (file)
 
                $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;
                }