]> git.sur5r.net Git - contagged/commitdiff
fixed problem with login check
authorAndreas Gohr <gohr@cosmocode.de>
Wed, 3 Dec 2008 12:49:50 +0000 (13:49 +0100)
committerAndreas Gohr <gohr@cosmocode.de>
Wed, 3 Dec 2008 12:49:50 +0000 (13:49 +0100)
darcs-hash:20081203124950-6e07b-5c1615368a408ee041509066d5bae872e68a79fc.gz

entry.php
img.php
orgs.php

index 4405991f2b81ec1e24b1e234ee7f5cac2c27c6d7..9edd1717023604763444909f21697fa163b46aa2 100644 (file)
--- a/entry.php
+++ b/entry.php
@@ -2,7 +2,7 @@
 require_once('inc/init.php');
 ldap_login();
 
 require_once('inc/init.php');
 ldap_login();
 
-if ($conf['userlogreq'] && $user == ''){
+if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){
   header('Location: login.php');
   exit();
 }
   header('Location: login.php');
   exit();
 }
diff --git a/img.php b/img.php
index cb405cda6cba3131e92e2ec15153714518770b2e..087ff2da69462cbda39e858f43f4b96d8e8c28bf 100644 (file)
--- a/img.php
+++ b/img.php
@@ -2,7 +2,7 @@
 require_once('inc/init.php');
 ldap_login();
 
 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 '<h1>Access Denied</h1>';
   exit();
   header("HTTP/1.0 401 Access Denied");
   echo '<h1>Access Denied</h1>';
   exit();
index f6ce2889f2d090b29e43d84e5851761f8331aa40..10aa301f65ee6f8f1cb2f41217c0e091ac834de5 100644 (file)
--- a/orgs.php
+++ b/orgs.php
@@ -2,7 +2,7 @@
   require_once('inc/init.php');
   ldap_login();
 
   require_once('inc/init.php');
   ldap_login();
 
-  if ($conf['userlogreq'] && $user == ''){
+  if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){
       header('Location: login.php');
       exit();
   }
       header('Location: login.php');
       exit();
   }