You are here

function domain_access_form_user_form_alter in Domain Access 8

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

Handle settings that the user cannot access.

File

domain_access/domain_access.module, line 287
Domain-based access control for content.

Code

function domain_access_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, DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD);
}