From 25825c4a69e5470fffe36b96682f7c2a686717f7 Mon Sep 17 00:00:00 2001 From: duergner Date: Thu, 20 Mar 2003 16:41:52 +0000 Subject: [PATCH] Problem with session_register fixed. Problem with duplicate sessions fixed --- lam/templates/login.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lam/templates/login.php b/lam/templates/login.php index 6c1f2329..4203b227 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -23,14 +23,13 @@ $Id$ LDAP Account Manager checking login data. */ -// including ldap.php which provides basic ldap functions -include_once("../lib/ldap.php"); - -$config = new Config; // Creating new Config object - // checking if the submitted username/password is correct. if($action == "checklogin") { + // including ldap.php which provides basic ldap functions + include_once("../lib/ldap.php"); + + $config = new Config; // Creating new Config object $ldap = new Ldap($config); // Creating new Ldap object $result = $ldap->connect($username,$passwd); if($result == True) // Username/password correct. Doing some configuration and loading main Frame. @@ -70,6 +69,10 @@ else session_register("config"); // Register $config object in session + // including ldap.php which provides basic ldap functions + include_once("../lib/ldap.php"); + + $config = new Config; // Creating new Config object include("./login.inc"); }