You are here

function devel_switch_user_form in Devel 7

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

Provides the Switch user form.

1 string reference to 'devel_switch_user_form'
devel_block_switch_user in ./devel.module
Provides the Switch user block.

File

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

Code

function devel_switch_user_form() {
  $form['username'] = array(
    '#type' => 'textfield',
    '#description' => t('Enter username'),
    '#autocomplete_path' => 'user/autocomplete',
    '#maxlength' => USERNAME_MAX_LENGTH,
    '#size' => 16,
  );
  $form['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Switch'),
  );
  $form['#attributes'] = array(
    'class' => array(
      'clearfix',
    ),
  );
  return $form;
}