hook_user_update

Versions
7
hook_user_update(&$edit, $account, $category)

A user account was updated.

Modules may use this hook to update their user data in a custom storage after a user account has been updated.

See also

hook_user_presave()

@see hook_user_insert()

Parameters

&$edit The array of form values submitted by the user.

$account The user object on which the operation is performed.

$category The active category of user information being edited.

Related topics

Code

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

<?php
function hook_user_update(&$edit, $account, $category) {
  db_insert('user_changes')
    ->fields(array(
      'uid' => $account->uid,
      'changed' => 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.