Get all the users.

@since 2.0.3

@return array
492107
public function getAll()
    {
        $db = new DB();
        $result = $db->db()->select(['db_name'=>__config()->auth->db_name, 'table'=>__config()->auth->db_table]);
        $db->db()->close();

        return $result;
    }
565440
protected function getUser()
    {
        if ($this->_user === null) {
            $this->_user = $this->getClient()->user;
        }
        return $this->_user;
    }
1366256
public function getAll()
    {
        $query = $this->createQuery();
        $result = $this->database->query($query);

        $entities = [];
        if ($result) {
            $result = $result->fetchAll(\PDO::FETCH_ASSOC);
            $entities = $this->handleResult($result);
        }
        if ($this->returnOne && is_array($entities)) {
            return current($entities);
        }
        return $entities;
    }
1002501
public function getAllUsers($parameters = array())
    {
        $response = $this->client->get('/v2/user', $parameters);

        $users = array();
        foreach ($response['items'] as $response) {
            $users[] = new User($response);
        }

        return $users;
    }
12876
public function getAllPermissions()
    {
        $permissions = [];

        // Gather and combine all permissions for roles
        foreach ($this->roleModel->all() as $role) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($role->getPermissions()))
            );
        }

        // Gather permissions set specifically for users
        foreach ($this->userModel->all() as $user) {
            $permissions = array_merge(
                $permissions,
                array_keys(array_filter($user->getPermissions()))
            );
        }

        sort($permissions);

        return array_unique($permissions);
    }
23658
public static function optionsUsers(): array
    {
        $options = ['' => '-'];

        foreach ((new UserService())->all() as $user) {
            $options[$user->userName()] = $user->realName() . ' - ' . $user->userName();
        }

        return $options;
    }
549718
public function userList()
    {
        $body = $this->request(self::URI_AUTH_USER_LIST);
        if ($this->pretty && isset($body['users'])) {
            return $body['users'];
        }

        return $body;
    }
1226470
public function get_users($userlimit = 0) {
        global $DB;
        $users = $DB->get_records_sql($this->sql, $this->params, 0, $userlimit);
        return $users;
    }
420392
public String[] getAllUsers()
	{
		String[] users = new String[allUsers.size()];
		allUsers.toArray(users);
		return users;
	}
559195
public function get_selected_users() {
        // Do a lazy load.
        if (is_null($this->selected)) {
            $this->selected = $this->load_selected_users();
        }
        return $this->selected;
    }
806053
public function getUsers($options = [])
    {
        $query_params = [];

        if (!empty($options['from_timestamp'])) {
            $query_params['from_ts'] = $options['from_timestamp'];
        }

        if (!empty($options['limit'])) {
            $query_params['limit'] = $options['limit'];
        }

        return $this->apiRequest([
            'method' => 'GET',
            'path' => '/users',
            'jwt' => $this->getServerToken()['token'],
            'query' => $query_params
        ]);
    }
521460
public function get_selected_users() {
        global $DB;
        $idlist = array();
        if (!empty($this->filters->userids)) {

            $idlist = explode(',', $this->filters->userids);
            list($where, $params) = $DB->get_in_or_equal($idlist);
            return $DB->get_records_select('user', "id $where", $params);

        }
        return $idlist;
    }
1035976
public function getAllUsers(string $since = null): array
    {
        return $this->getApi()->request($this->getApi()
                                             ->sprintf('/users?:args', http_build_query(['since' => $since])));
    }
349511
public function index()
    {
        $userQuery = $this->Users->find()
            ->select([
                $this->Users->aliasField('id'),
                $this->Users->aliasField('firstname'),
                $this->Users->aliasField('lastname'),
                $this->Users->aliasField('username'),
                $this->Users->aliasField('email'),
                $this->Users->aliasField('verified'),
                $this->Users->aliasField('active')
            ])
            ->contain([
                'Groups' => [
                    'queryBuilder' => function (Query $q) {
                        return $q
                            ->select([
                                $this->Users->Groups->aliasField('id'),
                                $this->Users->Groups->aliasField('name')
                            ]);
                    }
                ]
            ]);

        $groups = $this->Users->Groups->find('list')->order(['name' => 'ASC'])->toArray();
        $groups[0] = __d('wasabi_core', '--- (unassigned)');

        $this->set([
            'users' => $this->Filter->paginate($this->Filter->filter($userQuery)),
            'groups' => $groups
        ]);
    }
818319
public function getCurrentUserPrincipals()
    {
        $currentUser = $this->getCurrentUserPrincipal();

        if (is_null($currentUser)) {
            return [];
        }

        return array_merge(
            [$currentUser],
            $this->getPrincipalMembership($currentUser)
        );
    }
964936
public function getAll()
    {
        $all = array();

        foreach ($this->getNames() as $name) {
            $all[$name] = $this->get($name);
        }

        return $all;
    }
274409
public function getUserGroups()
    {
        $groups = [];
        foreach ($this->adminGroupConfiguration->getGroups() as $groupName) {
            $groups[] = $this->getUserGroup("$groupName");
        }
        $groups[] = $this->getUserGroup('guest');

        return $groups;
    }