--- devel.module +++ (clipboard) @@ -551,12 +551,15 @@ } function devel_block_switch_user() { - $links = devel_switch_user_list(); - if (!empty($links)) { - $block['subject'] = t('Switch user'); - $block['content'] = theme('links', $links); - $block['content'] .= drupal_get_form('devel_switch_user_form'); - return $block; + if (user_access('switch users')) { + $list_size = variable_get('devel_switch_user_list_size', 10); + $links = devel_switch_user_list(); + if (!empty($links) or $list_size == 0) { + $block['subject'] = t('Switch user'); + $block['content'] = theme('links', $links); + $block['content'] .= drupal_get_form('devel_switch_user_form'); + return $block; + } } }