You are here

function registration_role_admin_settings in Registration role 7

Same name and namespace in other branches
  1. 5 registration_role.module \registration_role_admin_settings()
  2. 6 registration_role.module \registration_role_admin_settings()

Form builder; The settings form for Registration Role.

See also

system_settings_form()

1 string reference to 'registration_role_admin_settings'
registration_role_menu in ./registration_role.module
Implements hook_menu().

File

./registration_role.module, line 53
The main registration_role.module file

Code

function registration_role_admin_settings() {
  $roles = user_roles(TRUE);
  unset($roles[DRUPAL_AUTHENTICATED_RID]);
  $form['registration_role_roles'] = array(
    '#type' => 'radios',
    '#title' => t('Role to automatically assign to new registrants'),
    '#options' => $roles,
    '#default_value' => variable_get('registration_role_roles', ''),
    '#description' => t('The selected role will be assigned to users who register using the user-registration form. Be sure this role does not have any privileges you fear giving out without reviewing who receives it.'),
  );
  return system_settings_form($form);
}