You are here

function user_admin_access_check in Drupal 4

Same name and namespace in other branches
  1. 5 modules/user/user.module \user_admin_access_check()
  2. 6 modules/user/user.admin.inc \user_admin_access_check()

Menu callback: check an access rule

1 string reference to 'user_admin_access_check'
user_menu in modules/user.module
Implementation of hook_menu().

File

modules/user.module, line 1532
Enables the user registration and login system.

Code

function user_admin_access_check() {
  $form['user'] = array(
    '#type' => 'fieldset',
    '#title' => t('Username'),
  );
  $form['user']['test'] = array(
    '#type' => 'textfield',
    '#title' => '',
    '#description' => t('Enter a username to check if it will be denied or allowed.'),
    '#size' => 30,
    '#maxlength' => 64,
  );
  $form['user']['type'] = array(
    '#type' => 'hidden',
    '#value' => 'user',
  );
  $form['user']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Check username'),
  );
  $output .= drupal_get_form('check_user', $form, 'user_admin_access_check');
  unset($form);

  // prevent endless loop?
  $form['mail'] = array(
    '#type' => 'fieldset',
    '#title' => t('E-mail'),
  );
  $form['mail']['test'] = array(
    '#type' => 'textfield',
    '#title' => '',
    '#description' => t('Enter an e-mail address to check if it will be denied or allowed.'),
    '#size' => 30,
    '#maxlength' => 64,
  );
  $form['mail']['type'] = array(
    '#type' => 'hidden',
    '#value' => 'mail',
  );
  $form['mail']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Check e-mail'),
  );
  $output .= drupal_get_form('check_mail', $form, 'user_admin_access_check');
  unset($form);

  // prevent endless loop?
  $form['host'] = array(
    '#type' => 'fieldset',
    '#title' => t('Hostname'),
  );
  $form['host']['test'] = array(
    '#type' => 'textfield',
    '#title' => '',
    '#description' => t('Enter a hostname or IP address to check if it will be denied or allowed.'),
    '#size' => 30,
    '#maxlength' => 64,
  );
  $form['host']['type'] = array(
    '#type' => 'hidden',
    '#value' => 'host',
  );
  $form['host']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Check hostname'),
  );
  $output .= drupal_get_form('check_host', $form, 'user_admin_access_check');
  unset($form);

  // prevent endless loop?
  return $output;
}