6.x user.pages.inc user_profile_form_submit($form, &$form_state)
7.x user.pages.inc user_profile_form_submit($form, &$form_state)

Submit function for the user account and profile editing form.

File

modules/user/user.pages.inc, line 286
User page callback file for the user module.

Code

function user_profile_form_submit($form, &$form_state) {
  $account = $form_state['values']['_account'];
  $category = $form_state['values']['_category'];
  unset($form_state['values']['_account'], $form_state['values']['op'], $form_state['values']['submit'], $form_state['values']['delete'], $form_state['values']['form_token'], $form_state['values']['form_id'], $form_state['values']['_category']);
  user_module_invoke('submit', $form_state['values'], $account, $category);
  user_save($account, $form_state['values'], $category);

  // 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;
}