mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
#12286 fix issue logout public link visual console
This commit is contained in:
parent
d5193615f9
commit
42aa751d29
@ -62,6 +62,12 @@ require_once 'include/functions_visual_map.php';
|
|||||||
|
|
||||||
$hash = (string) get_parameter('hash');
|
$hash = (string) get_parameter('hash');
|
||||||
|
|
||||||
|
// For public link issue.
|
||||||
|
$force_instant_logout = true;
|
||||||
|
if (isset($config['id_user']) === true) {
|
||||||
|
$force_instant_logout = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Check input hash.
|
// Check input hash.
|
||||||
// DO NOT move it after of get parameter user id.
|
// DO NOT move it after of get parameter user id.
|
||||||
if (User::validatePublicHash($hash) !== true) {
|
if (User::validatePublicHash($hash) !== true) {
|
||||||
@ -316,3 +322,10 @@ $visualConsoleItems = VisualConsole::getItemsFromDB(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
if ($force_instant_logout === true) {
|
||||||
|
unset($userAccessMaintenance, $config['id_user'], $hash);
|
||||||
|
session_destroy();
|
||||||
|
header_remove('Set-Cookie');
|
||||||
|
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user