Attempts to get all information about this user. This method
will make 3 requests!

@param mixed $identities
@return Dto\Summoner;
1738
public function allInfo($identities)
	{
		$summoners = $this->info($identities);
		$this->runePages($summoners);
		$this->masteryPages($summoners);

		return $summoners;
	}
419333
public function getIdentity()
    {
        if ($this->_result === null || !$this->_result->isValid()) {
            return null;
        }

        $identity = $this->_result->getData();
        if (!($identity instanceof IdentityInterface)) {
            $identity = $this->buildIdentity($identity);
        }

        return $identity;
    }
942915
public function identity($participantId)
	{
		$participantIdentity = $this->info['participantIdentities'];
		if (isset($participantIdentity[$participantId]))
		{
			return $participantIdentity[$participantId];
		}

		return null;
	}
220427
private function findAccountsByIds($ids)
    {
        if (0 === count($ids)) {
            return [];
        }

        $queryBuilder = $this->entityManager->createQueryBuilder()
            ->select('CONCAT(\'a\', a.id) AS id, a.name AS name')
            ->from($this->accountEntityClass, 'a')
            ->where('a.id IN (:ids)');

        $query = $queryBuilder->getQuery();
        $query->setParameter('ids', $ids);

        return $query->getArrayResult();
    }
490836
public function findAll(Identity $identity = null)
    {
        if ($identity === null) {
            $identity = $this->getIdentity();
        }

        return $this
            ->_fetchAll($identity)
            ->_fetchCount($identity)
            ->_returnCollection();
    }
291344
protected function getUserEntity() : ?User
    {
        if (!$this->userEntity && $this->userId)
        {
            $this->userEntity = $this->userRepository->findOneById($this->userId);
        }

        return $this->userEntity;
    }
281555
public function team($identities)
	{
		if (is_array($identities))
		{
			if (count($identities) > 10)
			{
				throw new ListMaxException('This request can only support a list of 10 elements, '.count($identities).' given.');
			}
		}

		$ids = $this->extractIds($identities);
		$ids = implode(',', $ids);

		$array = $this->request('team/by-summoner/'.$ids);

		$summoners = [];
		foreach ($array as $summonerId => $summonerTeams)
		{
			$teams = [];
			foreach ($summonerTeams as $info)
			{
				$id         = $info['fullId'];
				$team       = $this->attachStaticDataToDto(new Dto\Team($info));
				$teams[$id] = $team;
			}
			$summoners[$summonerId] = $teams;

			foreach ($teams as $id => $team)
			{
				$this->teams[$id] = $team;
			}
		}

		$this->attachResponses($identities, $summoners, 'teams');

		if (is_array($identities))
		{
			return $summoners;
		}
		else
		{
			return reset($summoners);
		}
	}
114137
protected static function _findUserByIdentity($identity)
    {
        return (new CmsAuthQuery)
            ->whereActive()->equals(true)
            ->andQuery((new CmsAuthQuery)
                ->whereUsername()->equals($identity)
                ->orFieldEmail()->equals($identity)
                ->orFieldId()->equals((integer)$identity))
            ->findFirst();
    }
534460
function get_identity($id = null)
    {
        $id = (int)$id;
        // cache identities for better performance
        if (!array_key_exists($id, $this->identities)) {
            $result = $this->list_identities($id ? "AND `identity_id` = $id" : '');
            $this->identities[$id] = $result[0];
        }

        return $this->identities[$id];
    }
772144
public static function getFromIdentityProvider(Provider $identityProvider)
    {
        // Have the identity provider authenticate the current identity.
        $identityProvider->authenticate();
        // The identity is valid according to the provider, so authentication is
        // passed.
        $userId = $identityProvider->getUserId();
        // Check for authorisation.
        try {
            Logger::get()->debug(sprintf(
                'Checking OpenID user %s...',
                $userId
            ));
            $user = Users::getInstance()->findEntity($userId);
            // The user is valid according to our records. Keep it in the session.
            $user->authenticate($identityProvider);
        } catch (NotFoundException $exception) {
            Logger::get()->warning(sprintf(
                'OpenID user %s is not known.',
                $userId
            ));
            throw new NotAuthorisedException(
                'OpenID user is not authorised.'
            );
        }

        return $user;
    }
174829
public function getIdentityRoles(UserInterface $user = null)
    {
        if ($user === null) {
            $user = $this->getDefaultIdentity();
            if (!$user) {
                return (array) $this->getModuleOptions()->getDefaultGuestRole();
            }
        }

        $resultSet = $this->getUserRoleLinkerMapper()->findByUser($user);

        if (count($resultSet) > 0) { // if exists in database
            $roles = array();
            foreach ($resultSet  as $userRoleLinker) {
                $roles[] = $userRoleLinker->getRoleId();
            }

            return $roles;
        } else {
            return (array) $this->getModuleOptions()->getDefaultUserRole();
        }

    }
948730
public function mergeIdentities($identities)
	{
		if ($identities instanceof Rule)
		{
			$identities = $identities->getData();
		}

		if (is_array($identities))
		{
			foreach ($identities as $identity => $allow)
			{
				$this->mergeIdentity($identity, $allow);
			}
		}
	}
247839
public function ranked($identity)
	{
		$summonerId = $this->extractId($identity);

		$params = [];
		if ( ! is_null($this->season))
		{
			$params['season'] = $this->season;
		}
		$info  = $this->request('stats/by-summoner/'.$summonerId.'/ranked', $params);
		$stats = $this->attachStaticDataToDto(new RankedStats($info));

		$this->attachResponse($identity, $stats, 'rankedStats');

		return $stats;
	}
1056483
protected function addRoles(IdentityInterface $identity, AuthorizationInfo $info): PdoRealm
    {
        $statement = $this
            ->getPdo()
            ->prepare($this->getRolesQuery());
        $statement->execute([
            $identity->getIdentifier(),
        ]);

        foreach ($statement->fetchAll() as $role) {
            $info->addRole(
                new Role($role['name'])
            );
        }

        return $this;
    }
510119
public function getIdentityVerificationAttributes($identities)
    {
        $this->_action = 'GetIdentityVerificationAttributes';
        $this->_method = 'GET';
        $this->_refreshDate();

        $parameters = array();

        $index = 1;
        if (is_array($identities)) {
            foreach ($identities as $identity) {
                if (!(filter_var($identity, FILTER_VALIDATE_EMAIL) || preg_match('/^([a-z\d]+(-[a-z\d]+)*\.)+[a-z]{2,}$/', $identity))) {
                    throw new Exception('Identity must be EmailAddress or Domain');
                    return;
                }
                $parameters['Identities.member.' . $index] = $identity;
                $index++;
            }
        }

        $this->_generateSignature($parameters);
        $res = $this->_request();
        if ($res['code'] == 200) {
            $entries = $res['body']->GetIdentityVerificationAttributesResult->VerificationAttributes->entry;
            $ret = array();
            foreach ($entries as $entry) {
                $ret[] = array(
                    'Email' => (string) $entry->key,
                    'Token' => (string) $entry->value->VerificationToken,
                    'Status' => (string) $entry->value->VerificationStatus
                );
            }
            return $ret;
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
112028
private function getUserEntity($id = null)
    {
        if (empty($id)) {
            return new Entity\Users();
        } elseif (!$userEntity = $this->getUser($id)) {
            $this->flashes()->error(Trans::__('general.phrase.user-not-exist'));

            return false;
        }

        $currentUser = $this->getUser();
        if (!$this->app['permissions']->isAllowedToManipulate($userEntity->toArray(), $currentUser->toArray())) {
            // Verify the current user has access to edit this user
            $this->flashes()->error(Trans::__('general.phrase.access-denied-privilege-edit-user'));

            return false;
        }

        return $userEntity;
    }
724022
public function deleteIdentity($identity)
    {
        $this->_action = 'DeleteIdentity';
        $this->_method = 'GET';
        $this->_refreshDate();

        if (!(filter_var($identity, FILTER_VALIDATE_EMAIL) || preg_match('/^([a-z\d]+(-[a-z\d]+)*\.)+[a-z]{2,}$/', $identity))) {
            throw new Exception('Identity must be EmailAddress or Domain');
            return;
        }

        $parameters = array(
            'Identity' => $identity
        );

        $this->_generateSignature($parameters);
        $res = $this->_request();
        if ($res['code'] == 200) {
            return (string) $res['body']->ResponseMetadata->RequestId;
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }