You are here

function user_edit_submit in Drupal 5

Same name and namespace in other branches
  1. 4 modules/user.module \user_edit_submit()
  2. 6 modules/user/user.pages.inc \user_edit_submit()

File

modules/user/user.module, line 1521
Enables the user registration and login system.

Code

function user_edit_submit($form_id, $form_values) {
  $account = $form_values['_account'];
  $category = $form_values['_category'];
  unset($form_values['_account'], $form_values['op'], $form_values['submit'], $form_values['delete'], $form_values['form_token'], $form_values['form_id'], $form_values['_category']);
  user_module_invoke('submit', $form_values, $account, $category);
  user_save($account, $form_values, $category);

  // Delete that user's menu cache:
  cache_clear_all($account->uid . ':', 'cache_menu', TRUE);

  // Clear the page cache because pages can contain usernames and/or profile information:
  cache_clear_all();
  drupal_set_message(t('The changes have been saved.'));
  return 'user/' . $account->uid;
}