public function ProfileFormController::save

Overrides Drupal\Core\Entity\EntityFormController::save().

Overrides EntityFormController::save

File

drupal/core/modules/user/lib/Drupal/user/ProfileFormController.php, line 45
Definition of Drupal\user\ProfileFormController.

Class

ProfileFormController
Form controller for the profile forms.

Namespace

Drupal\user

Code

public function save(array $form, array &$form_state) {
  $account = $this
    ->getEntity($form_state);
  $account
    ->save();
  $form_state['values']['uid'] = $account
    ->id();

  // Clear the page cache because pages can contain usernames and/or profile
  // information:
  cache_invalidate_tags(array(
    'content' => TRUE,
  ));
  drupal_set_message(t('The changes have been saved.'));
}