function multiple_registration_user_register_form_validate in Multiple Registration 8
Same name and namespace in other branches
- 8.2 multiple_registration.module \multiple_registration_user_register_form_validate()
- 3.x multiple_registration.module \multiple_registration_user_register_form_validate()
Extra form validation handler for form_user_register_form().
1 string reference to 'multiple_registration_user_register_form_validate'
File
- ./
multiple_registration.module, line 235 - Contains multiple_registration.module.
Code
function multiple_registration_user_register_form_validate(array &$form, FormStateInterface $form_state) {
$rid = $form_state
->getValue('rid');
// Force enable the role to user.
$form_state
->setValue([
'roles',
$rid,
], $rid);
}