diff --git a/user_login.php b/user_login.php index 079d9501..13e9f67d 100644 --- a/user_login.php +++ b/user_login.php @@ -202,6 +202,9 @@ } else if($_GET['action']=="logout") { + /* Session keys to skip on logout */ + $skip = array('debug', 'lang'); + /* Do these explicitly because i'm paranoid */ unset($_SESSION['name']); unset($_SESSION['username']); @@ -209,7 +212,7 @@ unset($_SESSION['users_id']); unset($_SESSION['users_type']); /* Take care of anything else */ - $keys = array_keys($_SESSION); + $keys = array_diff(array_keys($_SESSION), $skip); foreach($keys as $k) unset($_SESSION[$k]); if($notice != 'login_multirole') $notice = 'logged_out';