You are here

function devel_switch_user_form_submit in Devel 7

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

Submit handler for the Switch user form.

File

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

Code

function devel_switch_user_form_submit($form, &$form_state) {
  $path = 'devel/switch/' . $form_state['values']['username'];
  $form_state['redirect'] = array(
    $path,
    array(
      'query' => array(
        'destination' => '',
        'token' => drupal_get_token($path),
      ),
    ),
  );
}