From 244b62f61d9f578d52b1b0285eb851e6b0da26e8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 23 Jun 2007 22:18:15 +0000 Subject: [PATCH] cleanup of user's choices stored in session --- libraries/auth/cookie.auth.lib.php | 6 ++++-- libraries/auth/http.auth.lib.php | 2 ++ libraries/session_cleanup.lib.php | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 libraries/session_cleanup.lib.php diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 6fff95d3e..02d2b6135 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -355,8 +355,10 @@ function PMA_auth_check() } if (! empty($_REQUEST['old_usr'])) { - // The user wants to be logged out -> delete password cookie(s) - $_SESSION['last_access_time'] = null; + // The user wants to be logged out + // -> delete his choices that were stored in session + require_once './libraries/session_cleanup.lib.php'; + // -> delete password cookie(s) if ($GLOBALS['cfg']['LoginCookieDeleteAll']) { foreach($GLOBALS['cfg']['Servers'] as $key => $val) { PMA_removeCookie('pmaPass-' . $key); diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 8d8191e71..d5ebf407b 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -142,6 +142,8 @@ function PMA_auth_check() if (!empty($old_usr) && (isset($PHP_AUTH_USER) && $old_usr == $PHP_AUTH_USER)) { $PHP_AUTH_USER = ''; + // -> delete user's choices that were stored in session + require_once './libraries/session_cleanup.lib.php'; } // Returns whether we get authentication settings or not diff --git a/libraries/session_cleanup.lib.php b/libraries/session_cleanup.lib.php new file mode 100644 index 000000000..a9dad6d6a --- /dev/null +++ b/libraries/session_cleanup.lib.php @@ -0,0 +1,10 @@ +