diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-01-14 12:16:49 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-01-14 12:16:49 +0000 |
| commit | 6d1c51d9ae6e65a0619b6cb9d2ccefb4a972707f (patch) | |
| tree | 6e6b00f51f858f9ddc84dc469d9f61086acb7961 /frontends/php/include/perm.inc.php | |
| parent | 6d47f4278d61e0efde9cafab7d4dd5477f974891 (diff) | |
| download | zabbix-6d1c51d9ae6e65a0619b6cb9d2ccefb4a972707f.tar.gz zabbix-6d1c51d9ae6e65a0619b6cb9d2ccefb4a972707f.tar.xz zabbix-6d1c51d9ae6e65a0619b6cb9d2ccefb4a972707f.zip | |
- [DEV-95] added user status enabled/disabled (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5241 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/perm.inc.php')
| -rw-r--r-- | frontends/php/include/perm.inc.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php index 060739f8..bf1381a7 100644 --- a/frontends/php/include/perm.inc.php +++ b/frontends/php/include/perm.inc.php @@ -42,7 +42,6 @@ global $page; global $PHP_AUTH_USER,$PHP_AUTH_PW; global $USER_DETAILS; - global $_REQUEST; global $ZBX_LOCALNODEID; $USER_DETAILS = NULL; @@ -51,10 +50,12 @@ if( !is_null($sessionid)) { - if(!($USER_DETAILS = DBfetch(DBselect("select u.*,s.* from sessions s,users u". - " where s.sessionid=".zbx_dbstr($sessionid)." and s.userid=u.userid". - " and ((s.lastaccess+u.autologout>".time().") or (u.autologout=0))". - " and ".DBin_node('u.userid', $ZBX_LOCALNODEID))))) + if(!($USER_DETAILS = DBfetch(DBselect('SELECT u.*,s.* FROM sessions s,users u'. + ' WHERE s.sessionid='.zbx_dbstr($sessionid). + ' AND s.userid=u.userid'. + ' AND ((s.lastaccess+u.autologout>'.time().') OR (u.autologout=0))'. + ' AND '.DBin_node('u.userid', $ZBX_LOCALNODEID). + ' AND status='.USER_STATUS_ENABLED)))) { zbx_unsetcookie('zbx_sessionid'); DBexecute("delete from sessions where sessionid=".zbx_dbstr($sessionid)); |
