Active
Project:
Drupal vB
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2011 at 21:34 UTC
Updated:
5 Jul 2011 at 21:34 UTC
I'm having a problem with the vbulletin cookies not deleted after logging out. Turns out, that the $account object passed into the drupalvb_user_logout($account) function is always set to the anonymous user. After some investigation in the following function:
function user_logout() {
global $user;
watchdog('user', 'Session closed for %name.', array('%name' => $user->name));
// **** $user object is still authenticated ******
session_destroy();
// **** $user object is now anonymous ******
// Only variables can be passed by reference workaround.
$null = NULL;
user_module_invoke('logout', $null, $user); // here drupalvb_user_logout gets called
....
Notice that when the session is destroyed, the user object becomes anonymous, and then the hook_user logout handler in drupalvb fails.
Anyone else having this problem?