hook_user_logout

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_user_logout($account)

The user just logged out.

Parameters

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

Related topics

Code

modules/user/user.api.php, line 304

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