forked from science-ation/science-ation
- Skip some session variables on logout, clear everything else.
This commit is contained in:
parent
3f2c4d95f3
commit
a420a18143
@ -202,6 +202,9 @@
|
|||||||
}
|
}
|
||||||
else if($_GET['action']=="logout")
|
else if($_GET['action']=="logout")
|
||||||
{
|
{
|
||||||
|
/* Session keys to skip on logout */
|
||||||
|
$skip = array('debug', 'lang');
|
||||||
|
|
||||||
/* Do these explicitly because i'm paranoid */
|
/* Do these explicitly because i'm paranoid */
|
||||||
unset($_SESSION['name']);
|
unset($_SESSION['name']);
|
||||||
unset($_SESSION['username']);
|
unset($_SESSION['username']);
|
||||||
@ -209,7 +212,7 @@
|
|||||||
unset($_SESSION['users_id']);
|
unset($_SESSION['users_id']);
|
||||||
unset($_SESSION['users_type']);
|
unset($_SESSION['users_type']);
|
||||||
/* Take care of anything else */
|
/* Take care of anything else */
|
||||||
$keys = array_keys($_SESSION);
|
$keys = array_diff(array_keys($_SESSION), $skip);
|
||||||
foreach($keys as $k) unset($_SESSION[$k]);
|
foreach($keys as $k) unset($_SESSION[$k]);
|
||||||
|
|
||||||
if($notice != 'login_multirole') $notice = 'logged_out';
|
if($notice != 'login_multirole') $notice = 'logged_out';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user