Commit 6996292d authored by Dries's avatar Dries
Browse files

- Patch #46262 by Neil: load the anonymous user on logout.

parent 794b53e1
...@@ -941,7 +941,7 @@ function user_logout() { ...@@ -941,7 +941,7 @@ function user_logout() {
module_invoke_all('user', 'logout', NULL, $user); module_invoke_all('user', 'logout', NULL, $user);
// We have to use $GLOBALS to unset a global variable: // We have to use $GLOBALS to unset a global variable:
unset($GLOBALS['user']); $user = user_load(array('uid' => 0));
drupal_goto(); drupal_goto();
} }
......
...@@ -941,7 +941,7 @@ function user_logout() { ...@@ -941,7 +941,7 @@ function user_logout() {
module_invoke_all('user', 'logout', NULL, $user); module_invoke_all('user', 'logout', NULL, $user);
// We have to use $GLOBALS to unset a global variable: // We have to use $GLOBALS to unset a global variable:
unset($GLOBALS['user']); $user = user_load(array('uid' => 0));
drupal_goto(); drupal_goto();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment