1 user.api.php hook_user_insert($account)

Respond to creation of a new user account.

Parameters

$account: The user account object.

See also

hook_user_presave()

hook_user_update()

Related topics

File

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

Code

function hook_user_insert($account) {
  db_insert('mytable')
    ->fields(array(
      'uid' => $account->uid,
      'created' => REQUEST_TIME,
    ))
    ->execute();
}