function theme_user_list

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

File

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));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/theme_user_list/7.x