function hook_user_update

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.

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.

See also

hook_user_presave()

hook_user_insert()

Related topics

File

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

Code

function hook_user_update(&$edit, $account, $category) {
  db_insert('user_changes')
    ->fields(array(
      'uid' => $account->uid,
      'changed' => time(),
    ))
    ->execute();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.api.php/function/hook_user_update/7.x