You are here

function devel_switch_user_form_validate in Devel 7

Same name and namespace in other branches
  1. 5 devel.module \devel_switch_user_form_validate()
  2. 6 devel.module \devel_switch_user_form_validate()

Validate handler for the Switch user form.

File

./devel.module, line 1050
This module holds functions useful for Drupal development.

Code

function devel_switch_user_form_validate($form, &$form_state) {
  if (!($account = user_load_by_name($form_state['values']['username']))) {
    form_set_error('username', t('Username not found'));
  }
}