function autoassignrole_form_alter in Auto Assign Role 5.2
Same name and namespace in other branches
- 5 autoassignrole.module \autoassignrole_form_alter()
- 6.2 autoassignrole.module \autoassignrole_form_alter()
- 6 autoassignrole.module \autoassignrole_form_alter()
File
- ./
autoassignrole.module, line 185
Code
function autoassignrole_form_alter($form_id, &$form) {
if ($form_id == "user_register" && variable_get('AUTOASSIGNROLE_ROLE_USER_ACTIVE', '0') == 1 && !user_access('administer users')) {
$form['autoassignrole_user'] = array(
'#type' => 'fieldset',
'#title' => variable_get('AUTOASSIGNROLE_ROLE_USER_FIELDSET', t('User Role Selection')),
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
$form['autoassignrole_user']['AUTOASSIGNROLE_ROLE_USER'] = array(
'#type' => _autoassignrole_user_input('type'),
'#title' => variable_get('AUTOASSIGNROLE_ROLE_USER_TITLE', t("Role")),
'#options' => _autoassignrole_intersect(),
'#required' => _autoassignrole_user_input('required'),
'#description' => variable_get('AUTOASSIGNROLE_ROLE_USER_DESCRIPTION', ""),
);
}
}