function user_admin_access_form in Drupal 6
Same name and namespace in other branches
- 5 modules/user/user.module \user_admin_access_form()
Form builder; Configure access rules.
Related topics
1 string reference to 'user_admin_access_form'
- user_forms in modules/
user/ user.module - Implementation of hook_forms().
File
- modules/
user/ user.admin.inc, line 756 - Admin page callback file for the user module.
Code
function user_admin_access_form(&$form_state, $edit, $submit) {
$form = array();
$form['aid'] = array(
'#type' => 'value',
'#value' => $edit['aid'],
);
$form['status'] = array(
'#type' => 'radios',
'#title' => t('Access type'),
'#default_value' => isset($edit['status']) ? $edit['status'] : 0,
'#options' => array(
'1' => t('Allow'),
'0' => t('Deny'),
),
);
$type_options = array(
'user' => t('Username'),
'mail' => t('E-mail'),
'host' => t('Host'),
);
$form['type'] = array(
'#type' => 'radios',
'#title' => t('Rule type'),
'#default_value' => isset($type_options[$edit['type']]) ? $edit['type'] : 'user',
'#options' => $type_options,
);
$form['mask'] = array(
'#type' => 'textfield',
'#title' => t('Mask'),
'#size' => 30,
'#maxlength' => 64,
'#default_value' => $edit['mask'],
'#description' => '%: ' . t('Matches any number of characters, even zero characters') . '.<br />_: ' . t('Matches exactly one character.'),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => $submit,
);
$form['#submit'] = array(
'user_admin_access_form_submit',
);
return $form;
}