function hook_user_update

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

2 functions implement hook_user_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_crud_hook_test_user_update in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_user_update().
trigger_user_update in modules/trigger/trigger.module
Implements hook_user_update().
1 invocation of hook_user_update()
user_save in modules/user/user.module
Save changes to a user account or add a new user.

File

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

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.