function theme_user_list

7.x user.module theme_user_list($variables)
5.x user.module theme_user_list($users, $title = NULL)
6.x user.module theme_user_list($users, $title = NULL)

Returns HTML for a list of users.

Parameters

$variables: An associative array containing:

  • users: An array with user objects. Should contain at least the name and uid.
  • title: (optional) Title to pass on to theme_item_list().

Related topics

1 theme call to theme_user_list()
user_block_view in drupal/modules/user/user.module
Implements hook_block_view().
2 string references to the theme hook from theme_user_list()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

user_block_view in drupal/modules/user/user.module
Implements hook_block_view().
user_theme in drupal/modules/user/user.module
Implements hook_theme().

File

drupal/modules/user/user.module, line 1544
Enables the user registration and login system.

Code

function theme_user_list($variables) {
  $users = $variables['users'];
  $title = $variables['title'];
  $items = array();

  if (!empty($users)) {
    foreach ($users as $user) {
      $items[] = theme('username', array('account' => $user));
    }
  }
  return theme('item_list', array('items' => $items, 'title' => $title));
}