function UserListBuilder::load

Same name in other branches
  1. 9 core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::load()
  2. 10 core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::load()
  3. 11.x core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::load()

Overrides EntityListBuilder::load

File

core/modules/user/src/UserListBuilder.php, line 68

Class

UserListBuilder
Defines a class to build a listing of user entities.

Namespace

Drupal\user

Code

public function load() {
    $entity_query = $this->storage
        ->getQuery();
    $entity_query->condition('uid', 0, '<>');
    $entity_query->pager(50);
    $header = $this->buildHeader();
    $entity_query->tableSort($header);
    $uids = $entity_query->execute();
    return $this->storage
        ->loadMultiple($uids);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.