You are here

function simplify_form_user_register_form_alter in Simplify 8

Same name and namespace in other branches
  1. 7.3 simplify.module \simplify_form_user_register_form_alter()

Implements hook_form_FORM_ID_alter() for user_register_form().

Simplifies the "user registration form" to hide elements depending on settings.

File

./simplify.module, line 237
Hooks implemented by the simplify module.

Code

function simplify_form_user_register_form_alter(&$form, FormStateInterface $form_state, $form_id) {

  // Get array of fields to hide.
  $fields = _simplify_get_config_value('simplify_users_global');

  // Hide fields.
  simplify_hide_fields($fields, $form);
}