bug #3175227 [auth] Reset user cache on login.

This commit is contained in:
Michal Čihař
2011-02-08 13:15:01 +01:00
parent a6e6c3fcf1
commit cd74e9fa5d
4 changed files with 19 additions and 0 deletions

View File

@@ -134,6 +134,7 @@
- [security] Redirect external links to avoid Referer leakage.
- [interface] Default to not count tables in database.
- patch #3172172 [interface] Shortcut for copying table row.
- bug #3175227 [auth] Reset user cache on login.
3.3.10.0 (not yet released)
- patch #3147400 [structure] Aria table size printed as unknown,

View File

@@ -596,6 +596,12 @@ function PMA_auth_set_user()
* whether we come from a fresh cookie login
*/
define('PMA_COMING_FROM_COOKIE_LOGIN', true);
/**
* Clear user cache.
*/
PMA_clearUserCache();
PMA_sendHeaderLocation($redirect_url . PMA_generate_common_url($url_params, '&'));
exit();
} // end if

View File

@@ -131,6 +131,11 @@ function PMA_auth_check()
if (!empty($pma_token)) {
$_SESSION[' PMA_token '] = $pma_token;
}
/**
* Clear user cache.
*/
PMA_clearUserCache();
}
// Returns whether we get authentication settings or not

View File

@@ -2528,6 +2528,13 @@ function PMA_generate_slider_effect($id, $message)
<?php
}
/**
* Clears cache content which needs to be refreshed on user change.
*/
function PMA_clearUserCache() {
PMA_cacheUnset('is_superuser', true);
}
/**
* Verifies if something is cached in the session
*