You are here

function user_admin_access_check_submit in Drupal 6

Same name and namespace in other branches
  1. 4 modules/user.module \user_admin_access_check_submit()
  2. 5 modules/user/user.module \user_admin_access_check_submit()
3 string references to 'user_admin_access_check_submit'
user_admin_check_host in modules/user/user.admin.inc
user_admin_check_mail in modules/user/user.admin.inc
user_admin_check_user in modules/user/user.admin.inc

File

modules/user/user.admin.inc, line 845
Admin page callback file for the user module.

Code

function user_admin_access_check_submit($form, &$form_state) {
  switch ($form_state['values']['type']) {
    case 'user':
      if (drupal_is_denied('user', $form_state['values']['test'])) {
        drupal_set_message(t('The username %name is not allowed.', array(
          '%name' => $form_state['values']['test'],
        )));
      }
      else {
        drupal_set_message(t('The username %name is allowed.', array(
          '%name' => $form_state['values']['test'],
        )));
      }
      break;
    case 'mail':
      if (drupal_is_denied('mail', $form_state['values']['test'])) {
        drupal_set_message(t('The e-mail address %mail is not allowed.', array(
          '%mail' => $form_state['values']['test'],
        )));
      }
      else {
        drupal_set_message(t('The e-mail address %mail is allowed.', array(
          '%mail' => $form_state['values']['test'],
        )));
      }
      break;
    case 'host':
      if (drupal_is_denied('host', $form_state['values']['test'])) {
        drupal_set_message(t('The hostname %host is not allowed.', array(
          '%host' => $form_state['values']['test'],
        )));
      }
      else {
        drupal_set_message(t('The hostname %host is allowed.', array(
          '%host' => $form_state['values']['test'],
        )));
      }
      break;
    default:
      break;
  }
}