RE: starting session with AJAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found two small errors in the isLoggedIn(), which are corrected below.
They don't have any effect on the issue at hand though.  


**************************
function isLoggedIn($debug = 0){

global $COOKIE_NAME;

// if there is an active session.
if (isset($_SESSION) && $_SESSION['sessDBID'] != '' && $_SESSION['sessKey']
!= ""){

//. check the contents
return authenticate($_SESSION['sessDBID'], $_SESSION['sessKey']);

// or, check for (persistent) cookie.
}elseif (isset($_COOKIE[$COOKIE_NAME]) && $_COOKIE[$COOKIE_NAME] != ""){

$sessInfo = split('-', $_COOKIE[$COOKIE_NAME]);

// . and check the contents
if(authenticate($sessInfo[0], $sessInfo[1], $debug)){

// reset the cookie
return (mySessionStart(true, $sessInfo[0], $sessInfo[1], $debug));
}else{
// cookie authentication failed
return false;
}

}else{
// there is no session or cookie
return false;
}
}


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux