minor fix

This commit is contained in:
fbsanchez 2020-10-19 18:51:18 +02:00
parent 92211c71b7
commit 3562192d69

View File

@ -408,10 +408,12 @@ if (! isset($config['id_user'])) {
enterprise_hook('saml_logout'); enterprise_hook('saml_logout');
} }
$_SESSION = []; if (session_status() !== PHP_SESSION_NONE) {
session_destroy(); $_SESSION = [];
header_remove('Set-Cookie'); session_destroy();
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); header_remove('Set-Cookie');
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
}
// Process logout. // Process logout.
include 'general/logoff.php'; include 'general/logoff.php';
@ -973,10 +975,12 @@ if (isset($_GET['bye'])) {
enterprise_hook('saml_logout'); enterprise_hook('saml_logout');
} }
$_SESSION = []; if (session_status() !== PHP_SESSION_NONE) {
session_destroy(); $_SESSION = [];
header_remove('Set-Cookie'); session_destroy();
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); header_remove('Set-Cookie');
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
}
// Process logout. // Process logout.