- Patch #37738 by Junyor: fixed problem with Drupal not properly unsetting $user on logout.
parent
e900d28640
commit
48929eba7a
|
@ -956,7 +956,9 @@ function user_logout() {
|
||||||
// Destroy the current session:
|
// Destroy the current session:
|
||||||
session_destroy();
|
session_destroy();
|
||||||
module_invoke_all('user', 'logout', NULL, $user);
|
module_invoke_all('user', 'logout', NULL, $user);
|
||||||
unset($user);
|
|
||||||
|
// We have to use $GLOBALS to unset a global variable:
|
||||||
|
unset($GLOBALS['user']);
|
||||||
|
|
||||||
drupal_goto();
|
drupal_goto();
|
||||||
}
|
}
|
||||||
|
|
|
@ -956,7 +956,9 @@ function user_logout() {
|
||||||
// Destroy the current session:
|
// Destroy the current session:
|
||||||
session_destroy();
|
session_destroy();
|
||||||
module_invoke_all('user', 'logout', NULL, $user);
|
module_invoke_all('user', 'logout', NULL, $user);
|
||||||
unset($user);
|
|
||||||
|
// We have to use $GLOBALS to unset a global variable:
|
||||||
|
unset($GLOBALS['user']);
|
||||||
|
|
||||||
drupal_goto();
|
drupal_goto();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue