summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel.module15
1 files changed, 10 insertions, 5 deletions
diff --git a/devel.module b/devel.module
index 06c1b03..1ddb16e 100644
--- a/devel.module
+++ b/devel.module
@@ -424,6 +424,15 @@ function devel_block_devel() {
function devel_block_switch_user() {
$block['subject'] = t('Switch user');
+ $links = devel_switch_user_list();
+ if (!empty($links)) {
+ $block['content'] = theme('item_list', $links);
+ $block['content'] .= drupal_get_form('devel_switch_user_form');
+ return $block;
+ }
+}
+
+function devel_switch_user_list() {
$links = array();
if (user_access('switch users')) {
$dest = drupal_get_destination();
@@ -455,11 +464,7 @@ function devel_block_switch_user() {
}
}
}
- if (!empty($links)) {
- $block['content'] = theme('item_list', $links);
- $block['content'] .= drupal_get_form('devel_switch_user_form');
- return $block;
- }
+ return $links;
}
function devel_phpinfo() {