From: Andreas Gohr Date: Wed, 3 Dec 2008 12:49:50 +0000 (+0100) Subject: fixed problem with login check X-Git-Tag: 0.7.1~13 X-Git-Url: https://git.sur5r.net/?p=contagged;a=commitdiff_plain;h=e6398bad6d0293d1c7da37a410ae7e359895c41e fixed problem with login check darcs-hash:20081203124950-6e07b-5c1615368a408ee041509066d5bae872e68a79fc.gz --- diff --git a/entry.php b/entry.php index 4405991..9edd171 100644 --- a/entry.php +++ b/entry.php @@ -2,7 +2,7 @@ require_once('inc/init.php'); ldap_login(); -if ($conf['userlogreq'] && $user == ''){ +if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){ header('Location: login.php'); exit(); } diff --git a/img.php b/img.php index cb405cd..087ff2d 100644 --- a/img.php +++ b/img.php @@ -2,7 +2,7 @@ require_once('inc/init.php'); ldap_login(); -if ($conf['userlogreq'] && $user == ''){ +if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){ header("HTTP/1.0 401 Access Denied"); echo '

Access Denied

'; exit(); diff --git a/orgs.php b/orgs.php index f6ce288..10aa301 100644 --- a/orgs.php +++ b/orgs.php @@ -2,7 +2,7 @@ require_once('inc/init.php'); ldap_login(); - if ($conf['userlogreq'] && $user == ''){ + if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){ header('Location: login.php'); exit(); }