In Drupal 6 I want to get the username or user uid when user logged out. I tried with hook_user for logout operation in a custom module but without success. Allways I get the anonymous user.
0
votes
1 Answers
0
votes
Inside hook_user, the account being logged out is accessible in the $account object passed as a function parameter:
hook_user($op, &$edit, &$account, $category = NULL)
The UID can be found in $account->uid and the name in $account->name.