You are here

function user_admin_access_check_submit in Drupal 5

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

File

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

Code

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