You are here

function devel_block_switch_user in Devel 6

Same name and namespace in other branches
  1. 7 devel.module \devel_block_switch_user()
1 call to devel_block_switch_user()
devel_block in ./devel.module
Implementation of hook_block().

File

./devel.module, line 667

Code

function devel_block_switch_user() {
  $links = devel_switch_user_list();
  if (!empty($links) || user_access('switch users')) {
    $block['subject'] = t('Switch user');
    $block['content'] = theme('links', $links);
    if (variable_get('devel_switch_user_show_form', TRUE)) {
      $block['content'] .= drupal_get_form('devel_switch_user_form');
    }
    return $block;
  }
}