Skip to content
Snippets Groups Projects
Commit 6996292d authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 794b53e1
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -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();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment