You are here

function user_restrictions_ui_check_username_submit in User restrictions 7

Form submission handler for user_restrictions_ui_overview_form().

See also

user_restrictions_ui_overview_form()

1 string reference to 'user_restrictions_ui_check_username_submit'
user_restrictions_ui_overview_form in ./user_restrictions_ui.admin.inc
Form builder for the list of user restrictions.

File

./user_restrictions_ui.admin.inc, line 352
Administration pages for the user restrictions module.

Code

function user_restrictions_ui_check_username_submit($form, &$form_state) {
  $error = UserRestrictions::check($form_state, 'check_name');
  if ($error['message'] != '') {
    drupal_set_message($error['message'], 'warning');
  }
  else {
    drupal_set_message(t('The username %name is allowed.', array(
      '%name' => $form_state['values']['value'],
    )));
  }
}