- Patch #37738 by Junyor: fixed problem with Drupal not properly unsetting $user on logout.

4.7.x
Dries Buytaert 2005-11-15 20:47:06 +00:00
parent e900d28640
commit 48929eba7a
2 changed files with 6 additions and 2 deletions

View File

@ -956,7 +956,9 @@ function user_logout() {
// Destroy the current session:
session_destroy();
module_invoke_all('user', 'logout', NULL, $user);
unset($user);
// We have to use $GLOBALS to unset a global variable:
unset($GLOBALS['user']);
drupal_goto();
}

View File

@ -956,7 +956,9 @@ function user_logout() {
// Destroy the current session:
session_destroy();
module_invoke_all('user', 'logout', NULL, $user);
unset($user);
// We have to use $GLOBALS to unset a global variable:
unset($GLOBALS['user']);
drupal_goto();
}