You are here

function domain_form_user_form_alter in Domain Access 8

Same name and namespace in other branches
  1. 7.3 domain.module \domain_form_user_form_alter()
  2. 7.2 domain.module \domain_form_user_form_alter()

Implements hook_form_BASE_FORM_ID_alter() for \Drupal\user\UserForm.

Handle settings that the user cannot access.

File

domain/domain.module, line 106
Defines a Domain concept for use with Drupal.

Code

function domain_form_user_form_alter(&$form, &$form_state, $form_id) {

  // Add the options hidden from the user silently to the form.
  $manager = \Drupal::service('domain.element_manager');
  $form = $manager
    ->setFormOptions($form, $form_state, DomainInterface::DOMAIN_ADMIN_FIELD);
}