function rng_form_alter in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 rng.module \rng_form_alter()
- 8 rng.module \rng_form_alter()
Implements hook_form_alter().
File
- ./
rng.module, line 38
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;
}
}