load LoginCookieValidity from user prefereces cache to make it usable in auth plugins

This commit is contained in:
Crack
2010-09-21 13:10:59 +02:00
parent 1a3d33fbe2
commit 3a5f08f32d

View File

@@ -801,6 +801,18 @@ if (! defined('PMA_MINIMUM_COMMON')) {
require_once './libraries/logging.lib.php'; require_once './libraries/logging.lib.php';
// get LoginCookieValidity from preferences cache
// no generic solution for loading preferences from cache as some settings need to be kept
// for processing in PMA_Config::loadUserPreferences()
$cache_key = 'server_' . $GLOBALS['server'];
if (isset($_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity'])) {
$value = $_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity'];
$GLOBALS['PMA_Config']->set('LoginCookieValidity', $value);
$GLOBALS['cfg']['LoginCookieValidity'] = $value;
unset($value);
}
unset($cache_key);
// Gets the authentication library that fits the $cfg['Server'] settings // Gets the authentication library that fits the $cfg['Server'] settings
// and run authentication // and run authentication