get a list of all users.

@return array
@throws \GuzzleHttp\Exception\BadResponseException
549718
public function userList()
    {
        $body = $this->request(self::URI_AUTH_USER_LIST);
        if ($this->pretty && isset($body['users'])) {
            return $body['users'];
        }

        return $body;
    }
1230001
public function getActiveUsers()
    {
        $result = $this->getUsers();
        if ( $result->isSuccess() ) {
            $data = array();
            foreach ($result->data as $obj) {
                /** @var \Harvest\Model\User $obj */
                if ( $obj->get("is-active") == "true" ) {
                    $data[$obj->id] = $obj;
                }
            }
            $result->data = $data;
        }

        return $result;
    }
447999
public function getAll()
    {
        if ($this->isRequestGet()) {
            try {
                $format   = $this->getRequestParameter('format');
                $search   = $this->hasRequestParameter('search') ? $this->getRawParameter('search') : '';
                $limit    = $this->hasRequestParameter('limit') ? $this->getRequestParameter('limit') : 30;
                $offset   = $this->hasRequestParameter('offset') ? $this->getRequestParameter('offset') : 0;
                $selectedUris = [];

                if(! empty($search) ){
                    $decodedSearch = json_decode($search, true);
                    if(is_array($decodedSearch) && count($decodedSearch) > 0){
                        $search = $decodedSearch;
                    }
                }
                if($this->hasRequestParameter('selectedUri')){
                    $selectedUri = $this->getRequestParameter('selectedUri');
                    if (!empty($selectedUri)) {
                        $selectedUris = [$selectedUri];
                    }
                }

                $class = $this->getClassParameter();
                if ($this->hasRequestParameter('classOnly')) {
                    $resources = $this->getResourceService()->getClasses($class, $format, $selectedUris, $search, $offset, $limit);
                } else {
                    $resources = $this->getResourceService()->getResources($class, $format, $selectedUris, $search, $offset, $limit);
                }

                $user = \common_Session_SessionManager::getSession()->getUser();
                if(isset($resources['nodes'])){
                    $permissions = $this->getResourceService()->getResourcesPermissions($user, $resources['nodes']);
                } else {
                    $permissions = $this->getResourceService()->getResourcesPermissions($user, $resources);
                }

                $this->returnSuccess([
                    'resources' => $resources,
                    'permissions' => $permissions
                ]);

            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }
    }
1330664
public function getAllUsers() : array {
		$result = $this->db->query("SELECT id FROM accounts;");
		$users = [];
		foreach ($result->fetch_all(MYSQLI_ASSOC) as $user) {
			$users[(int)$user["id"]] = $this->getUserFromId((int)$user["id"]);
		}
		return $users;
	}
907198
protected function getListUser()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->user->getList($conditions);
        $this->prepareListUser($list);
        return $list;
    }
1050646
public function findAllUsers()
    {
        $this->checkDb();
        return $this->db->connect()
                        ->select()
                        ->from($this->tableName)
                        ->where("deleted IS NULL")
                        ->execute()
                        ->fetchAllClass(get_class($this));
    }
329104
public function list_usergroups()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/list/usergroup');

        return $this->process_response($response);
    }
218906
protected function getUsers(): array
    {
        return $this->repository->sudo(function (Repository $repository) {
            $query = new LocationQuery();
            $query->filter = new ContentTypeIdentifier('user');
            $query->offset = 0;
            $query->limit = 10;
            $query->performCount = true;
            $query->sortClauses[] = new SortClause\ContentName();

            $users = [];
            do {
                $results = $repository->getSearchService()->findContent($query);
                foreach ($results->searchHits as $hit) {
                    $users[] = $repository->sudo(function (Repository $repository) use ($hit) {
                        return $repository->getUserService()->loadUser($hit->valueObject->id);
                    });
                }

                $query->offset += $query->limit;
            } while ($query->offset < $results->totalCount);

            return $users;
        });
    }
324195
public function indexAction()
    {
        $allowed_users = array();
        $users = $this->getDoctrine()->getManager()->createQuery('SELECT r FROM FOMUserBundle:User r')->getResult();

        // ACL access check
        foreach ($users as $index => $user) {
            if ($this->isGranted('VIEW', $user)) {
                $allowed_users[] = $user;
            }
        }

        $oid = new ObjectIdentity('class', 'FOM\UserBundle\Entity\User');

        return array(
            'users'             => $allowed_users,
            'create_permission' => $this->isGranted('CREATE', $oid)
        );
    }
479641
protected function users()
    {
        $rows   = \Antares\Modules\SampleModule\Model\ModuleRow::query()->groupBy('user_id')->with('user')->get();
        $return = ['' => trans('antares/users::messages.statuses.all')];
        foreach ($rows as $row) {
            $return[$row->user_id] = $row->user->fullname;
        }
        return $return;
    }
872265
public function getAllUsersIndex()
    {
        $user = new User($this->di->get("db"));
        $users = $user->getAllUsers();

        $views = [
            ["comment/users/view-all", ["users" => $users], "main"]
        ];

        $this->di->get("pageRenderComment")->renderPage([
            "views" => $views,
            "title" => "Coffee users"
        ]);
    }
953329
public function getUsers()
    {
        if(!$this->isPropertyAvailable('Users')){
            $this->setProperty("Users", new UserCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath() , "Users")));
        }
        return $this->getProperty("Users");
    }
1088463
private function get_groups_all() {
        if (is_null($this->groups)) {
            // NOTE: Performance could be improved here. The system caches user groups
            // in $USER->groupmember[$courseid] => array of groupid=>groupid. Unfortunately this
            // structure does not include grouping information. It probably could be changed to
            // do so, without a significant performance hit on login, thus saving this one query
            // each request.
            $this->groups = groups_get_user_groups($this->course->id, $this->userid);
        }
        return $this->groups;
    }
1287648
public function getRequestUser()
    {
        if ($this->requestUser === null) {
            $token = $this->getRequestApiToken();
            if ($token === '') {
                $this->requestUser = 'no-token';
            } else {
                $ip = $this->app->make('ip');
                if ($ip->isBanned()) {
                    $this->requestUser = 'banned';
                } else {
                    $requestUser = null;
                    $list = new UserList();
                    $list->disableAutomaticSorting();
                    $list->filterByAttribute('api_token', $token);
                    $ids = $list->getResultIDs();
                    if (!empty($ids)) {
                        $u = \User::getByUserID($ids[0]);
                        if ($u->isRegistered()) {
                            $requestUser = $u;
                        }
                    }
                    if ($requestUser === null) {
                        $this->requestUser == 'invalid-token';
                        $ip->logSignupRequest();
                        if ($ip->signupRequestThreshholdReached()) {
                            $ip->createIPBan();
                        }
                    } else {
                        $this->requestUser = $requestUser;
                    }
                }
            }
        }
        if ($this->requestUser === 'no-token') {
            throw AccessDeniedException::create(t('API Access Token required'));
        }
        if ($this->requestUser === 'banned') {
            throw AccessDeniedException::create($this->app->make('ip')->getErrorMessage());
        }
        if ($this->requestUser === 'invalid-token') {
            throw AccessDeniedException::create(t('Bad API Access Token'));
        }

        return $this->requestUser;
    }
62395
private function getAllPermissions()
    {
        $user = auth()->user();

        if( $user->hasRole('admin') ) {
            $permissions = Permissions::select('id', 'name', 'action', 'created_at')->where('name', '!=', 'admin.acl.roles')->get();
        } elseif( $user->isSuperAdmin() ) {
            $permissions = Permissions::select('id', 'name', 'action', 'created_at')->get();
        } else {
            $permissions = collect([]);
        }

        $permissions = $permissions->sortBy('name')->groupBy('name');

        return json_encode($permissions);
    }
1361755
public function getUserAll($limit = 10, $cursor = '')
    {
        $url          = $this->url.'users';
        $option       = [
            'limit'  => $limit,
            'cursor' => $cursor
        ];
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'GET');
    }
810735
public function getUsers() {
    $tmp = array();
    foreach ($this->htpwd as $key => $line) {
      if(empty($line) || !strpos($line,':')) continue;
      array_push($tmp,explode(":",$line)[0]);
    }
    return $tmp;
  }