@see https://vk.com/dev/users.get

@param integer[]        $ids
@param AccessToken|null $token Current user if empty
@param array            $params

@return User[]
517830
public function usersGet(array $ids = [], AccessToken $token = null, array $params = [])
    {
        if (empty($ids) && !$token) {
            throw new \InvalidArgumentException('Some of parameters usersIds OR access_token are required');
        }

        $default = [
            'user_ids'     => implode(',', $ids),
            'fields'       => $this->userFields,
            'access_token' => $token ? $token->getToken() : null,
            'v'            => $this->version,
            'lang'         => $this->language
        ];
        $params  = array_merge($default, $params);
        $query   = $this->buildQueryString($params);
        $url     = "$this->baseUri/users.get?$query";

        $response   = $this->getResponse($this->createRequest(static::METHOD_GET, $url, $token, []))['response'];
        $users      = !empty($response['items']) ? $response['items'] : $response;
        $array2user = function ($userData) {
            return new User($userData);
        };

        return array_map($array2user, $users);
    }
879668
public function getList($id, array $params = array())
    {
        return $this->get($this->getPath().'/'.rawurlencode($id).'/list', $params);
    }
1125855
public function retrieveByToken($identifier, $token)
    {
        $user = $this->createModel()->first(
            ['_id' => $identifier, 'remember_token' => $token]
        );

        return $user;
    }
760465
protected function getExtraParams(AccessTokenEntityInterface $accessToken)
    {

        $user = User::where( 'id', $accessToken->getUserIdentifier() )->first();

        if ( $user->ehr_pid &&
            $user->connection ) {
            $patientRepo = new PatientRepository();
            $patientRepo->setConnection( $user->connection );
            $patient = $patientRepo->findByPid( $user->ehr_pid );
            if ( $patient->getStatus() == 'active' ) {
                $user->activeLoginCount = $user->activeLoginCount + 1;
            }
        }

        $user->loginCount = $user->loginCount + 1;
        $user->save();

        // Custom parameters for /signin can be added here
        $response = ['firstTimeLogin' => 0 ];
        if ( $user->loginCount == 1 ) {
            $response = ['firstTimeLogin' => 1 ];
        }

        $response = ['firstTimeLoginActive' => 0 ];
        if ( $user->activeLoginCount == 1 ) {
            $response = ['firstTimeLoginActive' => 1 ];
        }

        return $response;
    }
280270
public function getByIds($entityType, array $ids, array $params = [])
    {
        $validIds = array_values(array_unique(array_filter($ids, [__CLASS__, 'isIdValid'])));

        if (count($validIds) === 0) {
            return [];
        }

        $doSortByIds = empty($params['sort']);
        $results = $this->search($entityType, ['_id' => ['$in' => $validIds]], $params);
        if (!$doSortByIds) {
            return $results;
        }

        $flipped = array_flip($validIds);
        foreach ($results as $result) {
            $flipped[$result['_id']] = $result;
        }
        return array_filter(array_values($flipped), function ($result) {
            return is_array($result) && count($result) > 0;
        });

    }
952431
public function get($user_id, $params = [])
    {
        return User::make($this->client, $user_id)
            ->setParams($params);
    }
527658
public function retrieveByToken($identifier, $token) {
        /** @var RecordInterface|Authenticatable $userRecord */
        if (!$this->isValidIdentifierValue($identifier)) {
            return null;
        }
        $userRecord = $this->createEmptyUserRecord();
        /** @var RecordInterface $user */
        $user = $userRecord->fromDb([
            $userRecord->getAuthIdentifierName() => $identifier,
            $userRecord->getRememberTokenName() => $token,
        ], [], $this->getRelationsToFetch());

        return $this->validateUser($user, null);
    }
1206685
public function getByAccessToken(AccessTokenEntity $accessToken)
    {
        $result = $this->getConnection()->table('oauth_sessions')
                ->select('oauth_sessions.*')
                ->join('oauth_access_tokens', 'oauth_sessions.id', '=', 'oauth_access_tokens.session_id')
                ->where('oauth_access_tokens.id', $accessToken->getId())
                ->first();

        if (is_null($result)) {
            return;
        }

        return (new SessionEntity($this->getServer()))
               ->setId($result->id)
               ->setOwner($result->owner_type, $result->owner_id);
    }
1242191
protected function getUserByToken($token)
    {
        return $this->sdkClient()
                    ->useCustomApiEndpoint($this->getEnvironmentEndpoint('api'))
                    ->setAccessToken($token)
                    ->uses('Profile')
                    ->get()
                    ->toArray();
    }
881250
public function authenticatedUser($token = null)
    {
        $token = $this->getToken($token);

        $usersAPI = new Users($token);

        return $usersAPI->authenticatedUser();
    }
24356
public function getOpenID($accessToken = null)
	{
		$params = array(
			'access_token'	=>	null === $accessToken ? $this->accessToken : $accessToken,
		);
		if($this->isUseUnionID && OpenidMode::UNION_ID === $this->openidMode)
		{
			$params['unionid'] = $this->openidMode;
		}
		$this->result = $this->http->get($this->getUrl('oauth2.0/me', $params))->jsonp(true);
		if(isset($this->result['code']) && 0 != $this->result['code'])
		{
			throw new ApiException($this->result['msg'], $this->result['code']);
		}
		else
		{
			$this->openid = $this->result['openid'];
			if($this->isUseUnionID && OpenidMode::UNION_ID === $this->openidMode)
			{
				return $this->result['unionid'];
			}
			else 
			{
				return $this->openid;
			}
		}
	}
815753
public function findActionsForIds(array $ids)
    {
        if (empty($ids)) {
            return array();
        }

        $datas = $this->client->hmget($this->getActionKey(), $ids);

        return array_values(
            array_map(
                function ($v) {
                    return unserialize($v);
                },
                $datas
            )
        );
    }
69167
public function getByRememberToken(int $id, string $token) : ?Authenticatable
    {
        $model = $this->getModel();

        $user = $model->newQuery()
                      ->where($model->getAuthIdentifierName(), $id)
                      ->first();

        if ($user === null) {
            return null;
        }

        $rememberToken = $user->getRememberToken();

        return !empty($rememberToken) && hash_equals($rememberToken, $token) ? $user : null;
    }
511320
public function getAuthorizedUser(AccessToken $token)
    {
        $response = $this->fetchAuthorizedUserDetails($token);

        return $this->createAuthorizedUser($response);
    }
177538
public function findByIds(array $ids, User $actor = null)
    {
        $posts = $this->queryIds($ids, $actor)->get();

        $posts = $posts->sort(function ($a, $b) use ($ids) {
            $aPos = array_search($a->id, $ids);
            $bPos = array_search($b->id, $ids);

            if ($aPos === $bPos) {
                return 0;
            }

            return $aPos < $bPos ? -1 : 1;
        });

        return $posts;
    }
438462
public function find($token, $_params = array()) 
	{
        return $this->transform($this->master->get('availability/' . $token, $_params));
    }
1245133
public static UserGetCardListResult userGetCardList(String accessToken,
			UserGetCardList userGetCardList) {
		return userGetCardList(accessToken,
				JsonUtil.toJSONString(userGetCardList));
	}