Return members of the site.

@return User[]
181243
public function getMembers() {

		$siteMemberTable = CoreTables::getTableName( CoreTables::TABLE_SITE_MEMBER );

		return $this->hasMany( User::class, [ 'id' => 'userId' ] )
			->viaTable( $siteMemberTable, [ 'siteId' => 'id' ] );
	}
559195
public function get_selected_users() {
        // Do a lazy load.
        if (is_null($this->selected)) {
            $this->selected = $this->load_selected_users();
        }
        return $this->selected;
    }
330066
public function members(int $limit = 100) : array
    {
        $returnMembers = [];

        $members = $this->get(sprintf(self::COMMUNITY_ENDPOINT . 'communities/%s/members', $this->id()), [
            'limit' => $limit
        ]);

        if ($members->size === 0) return $returnMembers;

        foreach ($members->members as $member) {
            $returnMembers[] = new User($this->client, $member->onlineId);
        }

        return $returnMembers;
    }
512574
public function getUsers()
    {
        $userEntities = $this->findAll();
        if ($userEntities) {
            foreach ($userEntities as $userEntity) {
                $this->unsetSensitiveFields($userEntity);
            }
        }

        return $userEntities;
    }
264964
public function getAllAccounts()
    {
        $accounts = array_merge($this->getAllUsers(), $this->getResellers(), $this->getAdmins());
        ksort($accounts);
        return $accounts;
    }
18117
final public static function getMembers(): array
    {
        if (!isset(self::$constants[static::class])) {
            $reflection = new ReflectionClass(static::class);
            $constants = self::sortConstants($reflection);
            self::guardConstants($constants);
            self::$constants[static::class] = $constants;
        }

        return self::$constants[static::class];
    }
327202
function GetDetailedUsersArray()
  {
      $users_array = array();
      $result = $this->GetNextUserArray(TRUE);
      if (isset($result['user'])) {
          $users_array[$result['user']] = $result;
      }
      do {
          if ($result = $this->GetNextUserArray()) {
              if (isset($result['user'])) {
                  $users_array[$result['user']] = $result;
              }
          }
      } while (FALSE !== $result);
      return $users_array;
  }
335866
public function groups()
    {
        $return = ['everyone'];

        $groups = GroupMember::where('user_id', $this->id())
            ->sort('`group` ASC')
            ->all();

        foreach ($groups as $group) {
            $return[] = $group->group;
        }

        return $return;
    }
339053
public function getCounts()
    {
        $log = AccessLog::all()->groupBy('user_id');

        $counts = [];
        $all = 0;
        foreach ($log as $l) {
            $first = $l[0];
            $user = $first->user ? $first->user : $this->getDeletedFakeUser();
            $size = sizeof($l);
            $counts[] = [
                'size' => $size,
                'id' => $first->user_id,
                'name' => $user->username
            ];
            $all += $size;
        }

        return [
            'all' => $all,
            'counts' => $counts
        ];
    }
317699
public function getUsers(Result $result, $canEdit)
    {
        if (!$canEdit) {
            return [];
        }

        $repo = $this->om->getRepository('ClarolineCoreBundle:User');
        $roles = $result->getResourceNode()->getWorkspace()->getRoles()->toArray();
        $users = $repo->findUsersByRolesIncludingGroups($roles);

        return array_map(function ($user) {
            return [
                'id' => $user->getId(),
                'name' => "{$user->getFirstName()} {$user->getLastName()}",
            ];
        }, $users);
    }
26890
public function getUsersLogin()
    {
        $db = $this->getDb();
        $users = $db->fetchAll("SELECT login FROM " . $this->table . " ORDER BY login ASC");

        $return = array();
        foreach ($users as $login) {
            $return[] = $login['login'];
        }

        return $return;
    }
1149097
public function getPermissions(): array
    {
        $userID = $this->getID();
        if ($userID === null) {
            return [];
        }
        $data = Internal\Data::getValue('bearcms/users/user/' . md5($userID) . '.json');
        if ($data !== null) {
            $user = json_decode($data, true);
            return isset($user['permissions']) ? $user['permissions'] : [];
        }
        return [];
    }
296961
public function getRoles()
    {
        $roles = array();
        foreach ($this->groups as $group) {
            $roles[] = $group->getAsRole();
        }
        $roles[] = 'ROLE_USER';
        return $roles;
    }
988695
public function getActiveSiteMember() {

		$site		= Yii::$app->core->site;

		return $this->hasOne( SiteMember::class, [ "userId" => 'id' ] )->where( [ "siteId" => $site->id ] );
	}
295381
protected function getUsers() {
        if (!$this->_users) {
            $this->_users = new UserList($this->version, $this->solution['sid']);
        }

        return $this->_users;
    }
6019
public function roles()
    {
        $user   = $this->user();
        $userId = 0;
        is_null($user) || $userId = $user->getAuthIdentifier();
        $roles  = Arr::get($this->userRoles, "{$userId}", []);
        if (empty($roles)) {
            $roles = $this->getUserRolesFromEventDispatcher($user, $roles);
        }

        Arr::set($this->userRoles, "{$userId}", $roles);

        return $roles;
    }
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;
        });
    }