You are here

function _autoassignrole_user_input in Auto Assign Role 5

Same name and namespace in other branches
  1. 5.2 autoassignrole.module \_autoassignrole_user_input()
  2. 6.2 autoassignrole.module \_autoassignrole_user_input()
  3. 6 autoassignrole.module \_autoassignrole_user_input()
1 call to _autoassignrole_user_input()
autoassignrole_form_alter in ./autoassignrole.module

File

./autoassignrole.module, line 207

Code

function _autoassignrole_user_input($args) {
  switch ($args) {
    case 'type':
      if (variable_get('AUTOASSIGNROLE_ROLE_USER_MULTIPLE', 0) == 0) {
        $type = 'radios';
      }
      else {
        $type = 'checkboxes';
      }
      return $type;
      break;
    case 'required':
      if (variable_get('AUTOASSIGNROLE_ROLE_USER_REQUIRED', 0) == 0) {
        $required = FALSE;
      }
      else {
        $required = TRUE;
      }
      return $required;
      break;
  }
}