From: Joe Hunt Date: Tue, 1 Dec 2009 12:35:50 +0000 (+0000) Subject: session destroy X-Git-Tag: 2.3-final~1105 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ced4d3b728ed21cbefdd06210382b1e6127d14b1;p=fa-stable.git session destroy --- diff --git a/install/save.php b/install/save.php index 801c2a1a..acb8666b 100644 --- a/install/save.php +++ b/install/save.php @@ -379,10 +379,24 @@ if (!$db) display_error("The configuration file $config_filename is not writable. Change its permissions so it is, then re-run step 4."); } } - +/* session_unset(); session_destroy(); $_SESSION = array(); +*/ +session_start(); +$_SESSION = array(); +// If it's desired to kill the session, also delete the session cookie. +// Note: This will destroy the session, and not just the session data! +if (ini_get("session.use_cookies")) { + $params = session_get_cookie_params(); + setcookie(session_name(), '', time() - 42000, + $params["path"], $params["domain"], + $params["secure"], $params["httponly"] + ); +} +// Finally, destroy the session. +session_destroy(); header("Location: ".$path_to_root."/index.php"); exit();