function _role_expire_get_rids in Role Expire 6
Helper function; Return a form element with the valid roles.
Return value
unknown_type
2 calls to _role_expire_get_rids()
- role_expire_rules_action_remove_role_expire_form in ./
role_expire.rules.inc - Action: Add expire time to role form configuration.
- role_expire_rules_action_set_role_expire_form in ./
role_expire.rules.inc - Action: Add expire time to role form configuration.
File
- ./
role_expire.rules.inc, line 90 - Rules integration for the role expire module.
Code
function _role_expire_get_rids($settings) {
// Get valid roles.
$roles = user_roles(TRUE);
unset($roles[DRUPAL_AUTHENTICATED_RID]);
// The role ID.
return array(
'#type' => 'select',
'#options' => $roles,
'#title' => t('Role'),
'#required' => TRUE,
'#description' => t('Select a role.'),
'#default_value' => $settings['rid'],
);
}