theme_user_list

  1. drupal
    1. 4.7 user.module
    2. 5 user.module
    3. 6
    4. 7
Versions
4.7 – 6 theme_user_list($users, $title = NULL)
7 theme_user_list($variables)

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

Code

drupal/modules/user/user.module, line 1479

<?php
function theme_user_list($variables) {
  $users = $variables['users'];
  $title = $variables['title'];

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