Problem with session_register fixed. Problem with duplicate sessions fixed

This commit is contained in:
duergner 2003-03-20 16:37:20 +00:00
parent 4604438e7f
commit b166dc8f36
1 changed files with 10 additions and 8 deletions

View File

@ -23,15 +23,10 @@ $Id$
LDAP Account Manager checking login data. LDAP Account Manager checking login data.
*/ */
// Starting LDAP Account Manager session
session_name("LDAP Account Manager");
session_start();
// including ldap.php which provides basic ldap functions // including ldap.php which provides basic ldap functions
include_once("../lib/ldap.php"); include_once("../lib/ldap.php");
$config = new Config; // Creating new Config object $config = new Config; // Creating new Config object
session_register($config); // Register $config object in session
// checking if the submitted username/password is correct. // checking if the submitted username/password is correct.
if($action == "checklogin") if($action == "checklogin")
@ -40,8 +35,8 @@ if($action == "checklogin")
$result = $ldap->connect($username,$passwd); $result = $ldap->connect($username,$passwd);
if($result == True) // Username/password correct. Doing some configuration and loading main Frame. if($result == True) // Username/password correct. Doing some configuration and loading main Frame.
{ {
session_register(ldap); // Register $ldap object in session session_register("ldap"); // Register $ldap object in session
session_register(language); // Register $language in session session_register("language"); // Register $language in session
// setting language // setting language
$language = explode(":", $language); $language = explode(":", $language);
@ -69,6 +64,13 @@ if($action == "checklogin")
// Loading Login page // Loading Login page
else else
{ {
// Starting LDAP Account Manager session
session_name("LDAP Account Manager");
session_start();
session_register("config"); // Register $config object in session
include("./login.inc"); include("./login.inc");
} }
?> ?>