class LoginSessionGenerator extends MethodGenerator {
function LoginSessionGenerator() {}
/**
* Logout
*
* @access public
*/
function &logout() { // STATIC VOID METHOD
global $projectFolderName, $projectURLPath, $willAuthenticate, $projectAcronym;
if ($willAuthenticate) setcookie("$projectFolderName", '', time() - 86400); // DELETE COOKIE
foreach ($_SESSION as $key => $val) {
if (preg_match("/^${projectAcronym}_/i", $key)) unset($_SESSION[$key]); // DELETE ALL PROJECT SESSION VARIABLES
}
header('Location: [url]http://[/url]' . $_SERVER['SERVER_NAME'] . "$projectURLPath/index.php"); // DEFAULT REDIRECT TO MAIN PAGE
}
}
....
if ($_REQUEST['willLogout'])
LoginSessionGenerator::logout();
For some wacko reason, this class method does absolutely nothing except redirect. The cookie and session remains intact and unchanged, even the instance is intact and unchanged.
Could someone help me with this one?
Thanx
Phil