cleanup of user's choices stored in session

This commit is contained in:
Marc Delisle
2007-06-23 22:18:15 +00:00
parent 7d29630f9b
commit 244b62f61d
3 changed files with 16 additions and 2 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -0,0 +1,10 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Cleanup, at logout time, of user choices stored in session
*
* @version $Id: cleanup.lib.php 10142 2007-03-20 10:32:13Z cybot_tm $
*/
unset($_SESSION['navi_limit_offset']);
?>