function hook_user_presave


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 user.api.php hook_user_presave(&$edit, $account, $category)
cle7 user.api.php hook_user_presave(&$edit, $account, $category)
elmsmedia7 user.api.php hook_user_presave(&$edit, $account, $category)
icor7 user.api.php hook_user_presave(&$edit, $account, $category)
meedjum_blog7 user.api.php hook_user_presave(&$edit, $account, $category)
mooc7 user.api.php hook_user_presave(&$edit, $account, $category)

A user account is about to be created or updated.

This hook is primarily intended for modules that want to store properties in the serialized {users}.data column, which is automatically loaded whenever a user account object is loaded, modules may add to $edit['data'] in order to have their data serialized on save.


$edit: The array of form values submitted by the user. Assign values to this array to save changes in the database.

$account: The user object on which the operation is performed. Values assigned in this object will not be saved in the database.

$category: The active category of user information being edited.

See also



Related topics

8 functions implement hook_user_presave()

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

bakery_user_presave in sites/all/modules/ulmus/bakery/bakery.module
Implements hook_user_presave().
block_user_presave in modules/block/block.module
Implements hook_user_presave().
contact_user_presave in modules/contact/contact.module
Implements hook_user_presave().
entity_crud_hook_test_user_presave in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_user_presave().
overlay_user_presave in modules/overlay/overlay.module
Implements hook_user_presave().

... See full list

3 invocations of hook_user_presave()
EntityAPIController::save in sites/all/modules/ulmus/entity/includes/
Implements EntityAPIControllerInterface.
field_attach_presave in modules/field/
Perform necessary operations just before fields data get saved.
user_save in modules/user/user.module
Save changes to a user account or add a new user.


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


function hook_user_presave(&$edit, $account, $category) {
  // Make sure that our form value 'mymodule_foo' is stored as
  // 'mymodule_bar' in the 'data' (serialized) column.
  if (isset($edit['mymodule_foo'])) {
    $edit['data']['mymodule_bar'] = $edit['mymodule_foo'];



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.