function hook_user_logout

The user just logged out.

Parameters

$account: The user object on which the operation was just performed.

Related topics

2 functions implement hook_user_logout()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

openid_user_logout in drupal/core/modules/openid/openid.module
Implements hook_user_logout().
user_user_logout in drupal/core/modules/user/user.module
Implements hook_user_logout().
1 invocation of hook_user_logout()
user_logout in drupal/core/modules/user/user.pages.inc
Menu callback; logs the current user out, and redirects to the home page.

File

drupal/core/modules/user/user.api.php, line 321
Hooks provided by the User module.

Code

function hook_user_logout($account) {
  db_insert('logouts')
    ->fields(array(
    'uid' => $account->uid,
    'time' => time(),
  ))
    ->execute();
}