hook_user_logout

Versions
7
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 299

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

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.