Index: user_list.module =================================================================== --- user_list.module (revision 2737) +++ user_list.module (working copy) @@ -350,9 +350,9 @@ function user_list_block($op = 'list', $ $blocks[$type] = array('info' => t('User List: Users with @types', array('@type' => $name))); } } - foreach (variable_get('user_list_role_types', array()) as $type) { - if (_user_list_get_roles('base',$type)) { - $blocks[$type] = array('info' => t('User List: Users with %role', array('%role' => _user_list_get_roles('name',$type)))); + foreach (variable_get('user_list_role_types', array()) as $type => $enabled) { + if ($enabled && _user_list_get_roles('base', $type)) { + $blocks[$type] = array('info' => t('User List: Users with role @role', array('@role' => _user_list_get_roles('name', $type)))); } } return $blocks; @@ -427,14 +427,14 @@ function user_list_block($op = 'list', $ $block['subject'] = variable_get('user_list_block_header_' . $delta, t('Recent Users')); $block['content'] = _user_list('newest', $number, false, $include_more, '', NULL, NULL, $embed_menu, true); } - else if (in_array($delta, variable_get('user_list_content_types', array()))) { + else if (in_array($delta, array_keys(variable_get('user_list_content_types', array())), true)) { if ($include_more) { $include_more = l(variable_get('user_list_block_more_msg_' . $delta, t('View More')), 'userlist/content/' . $delta); } $block['subject'] = variable_get('user_list_block_header_' . $delta, t('Users who have contributed at least one @content', array('@content' => node_get_types('name', $delta)))); $block['content'] = _user_list('content', $number, false, $include_more, '', NULL, $delta, $embed_menu, true); } - else if (in_array($delta, variable_get('user_list_role_types', array()))) { + else if (in_array($delta, array_keys(variable_get('user_list_role_types', array())), true)) { if ($include_more) { $include_more = l(variable_get('user_list_block_more_msg_' . $delta, t('View More')), 'userlist/roles/' . $delta); }