Returns the user records for all users in all workspaces you have access.

@return string|null
420094
public function getUsers($opt_fields = null)
    {
        $url = $opt_fields ? 'users?opt_fields=' . $opt_fields : 'users';
        return $this->curl->get($url);
    }
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;
    }
901796
public function getUsersPairsWithGroupNamesForSelects()
    {
        // Check and init cache
        if (!self::$cached_users_pairs_with_groups) {
            $user_collection = new AdminUserRepository;
            $user_collection->addOrderByField('name');
            foreach ($user_collection->getAsArrayOfObjects() as $v) {
                /** @var AdminUser $v */

                $group = new AdminUserGroup($v->getGroupId());
                self::$cached_users_pairs_with_groups[$group->getTitle()][$v->getId()] = $v->getName() . ' ' . $v->getSurname() . ' [' . $v->getLogin() . ']';
            }
        }

        return self::$cached_users_pairs_with_groups;
    }
68736
public function getAllUsers($include_docs = false)
	{
		$client = new CouchClient($this->client->dsn(), $this->usersdb, $this->client->options());
		if ($include_docs) {
			$client->include_docs(true);
		}
		return $client->startkey("org.couchdb.user:")->endkey("org.couchdb.user?")->getAllDocs()->rows;
	}
71652
protected function getUsageRecords() {
        if (!$this->_usageRecords) {
            $this->_usageRecords = new UsageRecordList($this->version, $this->solution['sid']);
        }

        return $this->_usageRecords;
    }
597141
public function users()
    {
        $list  = [];
        $users = User::all();

        foreach ($users as $key => $user) {
            $list[$user->id] = $user->name;
        }

        return $list;
    }
387960
public function getMemberUsers() {

		$memberTable = CmnTables::getTableName( CmnTables::TABLE_GROUP_MEMBER );

		return $this->hasMany( User::class, [ 'id' => 'userId' ] )
			->viaTable( $memberTable, [ 'groupId' => 'id' ] );
	}
750259
private function getWorkspaceUsersIds(Workspace $workspace)
    {
        // Select all user(s) belonging to the target workspace (manager and collaborators)...
        $selectUsersIds = 'SELECT DISTINCT cur.user_id FROM claro_user_role cur JOIN claro_role cr ON cr.id = cur.role_id  WHERE cr.workspace_id = :wid';
        $idStmt = $this->em->getConnection()->prepare($selectUsersIds);
        $idStmt->bindValue('wid', $workspace->getId());
        $idStmt->execute();
        $idResults = $idStmt->fetchAll();
        foreach ($idResults as $result) {
            $ids[] = $result['user_id'];
        }

        return $ids;
    }
78139
public function getUsers()
    {
        if ($this->users === null) {
            $this->setUsers($this->userRepository->getAllByEnvironment($this));
        }
        return $this->users;
    }
1223659
private function searchUsers()
    {
        $criteria = Criteria::create()
            ->where(Criteria::expr()->lte(
                $this->classMetadata->getPropertyName(ClassMetadata::LAST_ACTION_PROPERTY),
                new \DateTime($this->dateTimeRule))
            )
            ->andWhere(
                Criteria::expr()->neq(
                    $this->classMetadata->getPropertyName(ClassMetadata::API_KEY_PROPERTY),
                    null
                )
            );

        return $this->getUsersByCriteria($criteria);
    }
156625
public function allLoggedIn(): Collection
    {
        return DB::table('user')
            ->join('session', 'session.user_id', '=', 'user.user_id')
            ->where('user.user_id', '>', 0)
            ->orderBy('real_name')
            ->select(['user.*'])
            ->distinct()
            ->get()
            ->map(User::rowMapper());
    }
1366313
public function listWorkspacesByUserAction()
    {
        $this->assertIsGranted('ROLE_USER');
        $token = $this->tokenStorage->getToken();
        $user = $token->getUser();
        $roles = $this->utils->getRoles($token);

        $data = $this->tagManager->getDatasForWorkspaceListByUser($user, $roles);
        $favouriteWorkspaces = $this->workspaceManager
            ->getFavouriteWorkspacesByUser($user);
        $favourites = array();

        foreach ($data['workspaces'] as $workspace) {
            if (isset($favouriteWorkspaces[$workspace->getId()])) {
                $favourites[$workspace->getId()] = $workspace;
            }
        }

        $data['user'] = $user;
        $data['favourites'] = $favourites;

        return $data;
    }
55348
public function personalWorkspaceResourceRightsConfigAction()
    {
        $roles = $this->roleManager->getAllPlatformRoles();
        $rights = $this->rightsManager->getAllPersonalWorkspaceRightsConfig();

        return array(
            'roles' => $roles,
            'rights' => $rights
        );
    }
248136
public function getWorkspaces()
    {
        return $this->getCachedProperty(
            'workspaces',
            function () {
                $workspaces = [];
                $items = $this->getDomElement()->getElementsByTagNameNS($this->ns(), 'workspace');
                foreach ($items as $item) {
                    $workspaces[] = $this->getExtensions()->parseElement($this, $item);
                }

                return $workspaces;
            }
        );
    }
405713
public function getAccounts()
  {
    //Is Group: Further accounts can be made under Groups, but entries can be made against non-Groups
    $accounts = array();

    $this->Account->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($Account) use (&$accounts)
    {
      array_push($accounts, array('label'=> $Account->key . ' ' . $Account->name, 'value'=>$Account->id));
    });

    return $accounts;
  }
1039895
public function findWorkspaceRolesForUser(User $user, Workspace $workspace)
    {
        $dql = "
            SELECT r FROM Claroline\CoreBundle\Entity\Role r
            JOIN r.workspace ws
            JOIN r.users user
            WHERE ws.guid = '{$workspace->getGuid()}'
            AND r.name != 'ROLE_ADMIN'
            AND user.id = {$user->getId()}
        ";

        $query = $this->_em->createQuery($dql);

        return $query->getResult();
    }
114506
protected function getRecords() {
        if (!$this->_records) {
            $this->_records = new RecordList($this->version, $this->solution['accountSid']);
        }

        return $this->_records;
    }