function rng_form_alter in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 rng.module \rng_form_alter()
- 3.x rng.module \rng_form_alter()
Implements hook_form_alter().
File
- ./
rng.module, line 34
Code
function rng_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form_id == 'user_admin_permissions') {
// Anonymous 'user' cannot register himself because it is a fake user.
$form['permissions']['rng register self'][AccountInterface::ANONYMOUS_ROLE]['#disabled'] = TRUE;
$form['permissions']['rng register self'][AccountInterface::ANONYMOUS_ROLE]['#access'] = FALSE;
}
}