summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/perm.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-19 14:03:07 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-19 14:03:07 +0000
commit99925d2e547feae40dd25e536b8dfb692c453074 (patch)
tree3bd78a0d192a62b99e940199e3182c029a7e981f /frontends/php/include/perm.inc.php
parent6ec6a364e9f22c7d5b6ee195808e40d36cd759c0 (diff)
downloadzabbix-99925d2e547feae40dd25e536b8dfb692c453074.tar.gz
zabbix-99925d2e547feae40dd25e536b8dfb692c453074.tar.xz
zabbix-99925d2e547feae40dd25e536b8dfb692c453074.zip
- fixed authorisation error (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2864 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/perm.inc.php')
-rw-r--r--frontends/php/include/perm.inc.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index 864ae9dc..a2e79767 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -50,6 +50,14 @@ define("GROUP_RIGHT", 0);
$db_users = DBselect($sql);
$USER_DETAILS = DBfetch($db_users);
+ if(!$USER_DETAILS)
+ {
+ unset($sessionid);
+ unset($_COOKIE["sessionid"]);
+
+ $db_users = DBselect("select u.* from users u where u.alias='guest'");
+ $USER_DETAILS = DBfetch($db_users);
+ }
if($USER_DETAILS)
{
if(isset($sessionid))
@@ -74,7 +82,11 @@ define("GROUP_RIGHT", 0);
return;
}
- else unset($USER_DETAILS);
+ else
+ {
+ echo 'guest user can\'t be found';
+ exit;
+ }
// Incorrect login