Skip to content

Instantly share code, notes, and snippets.

@arturo-c
Created January 23, 2012 16:57
Show Gist options
  • Save arturo-c/1664241 to your computer and use it in GitHub Desktop.
Save arturo-c/1664241 to your computer and use it in GitHub Desktop.
diff --git a/resources/user_resource.inc b/resources/user_resource.inc
index 3a312de..23017b2 100644
--- a/resources/user_resource.inc
+++ b/resources/user_resource.inc
@@ -401,10 +401,10 @@ function _user_resource_logout() {
watchdog('user', 'Session closed for %name.', array('%name' => theme('placeholder', $user->name)));
- // Destroy the current session:
- session_destroy();
$null = NULL; // Only variables can be passed by reference workaround
user_module_invoke('logout', $null, $user );
+ // Destroy the current session:
+ session_destroy();
// Load the anonymous user
$user = drupal_anonymous_user();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment