Improve session destroy
This commit is contained in:
parent
3e1229a4d1
commit
76bc123062
19
vendor/PicoFarad/Session.php
vendored
19
vendor/PicoFarad/Session.php
vendored
@ -41,6 +41,25 @@ function open($base_path = '/', $save_path = '')
|
|||||||
|
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
|
// Flush all sessions variables
|
||||||
|
$_SESSION = array();
|
||||||
|
|
||||||
|
// Destroy the session cookie
|
||||||
|
if (ini_get('session.use_cookies')) {
|
||||||
|
$params = session_get_cookie_params();
|
||||||
|
|
||||||
|
setcookie(
|
||||||
|
session_name(),
|
||||||
|
'',
|
||||||
|
time() - 42000,
|
||||||
|
$params['path'],
|
||||||
|
$params['domain'],
|
||||||
|
$params['secure'],
|
||||||
|
$params['httponly']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destroy session data
|
||||||
session_destroy();
|
session_destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user