Retrieve a user by by their unique identifier and "remember me" token.

@param  mixed   $identifier
@param  string  $token
@return \Illuminate\Contracts\Auth\Authenticatable|null
162276
public function retrieveByToken($identifier, $token)
    {
        return $this->query->filterById($identifier)
            ->filterByRememberToken($token)
            ->findOne();
    }
618153
public function fetch($identifier)
    {
        $table = JUser::getTable();

        if ($table->load($identifier))
        {
            $user = JUser::getInstance(0);
            $user->setProperties($table->getProperties());

            $params = new JRegistry;
            $params->loadString($table->params);

            $user->setParameters($params);

            $data = array(
                'id'         => $user->id,
                'email'      => $user->email,
                'name'       => $user->name,
                'username'   => $user->username,
                'password'   => $user->password,
                'salt'       => '',
                'groups'     => JAccess::getGroupsByUser($user->id),
                'roles'      => JAccess::getAuthorisedViewLevels($user->id),
                'authentic'  => !$user->guest,
                'enabled'    => !$user->block,
                'expired'    => (bool) $user->activation,
                'attributes' => $user->getParameters()->toArray()
            );

            $user = $this->create($data);
        }
        else $user = null;

        return $user;
    }
884278
public function retrieveById($identifier)
    {
        $user = $this->conn->table($this->table)->find($identifier);

        return $this->getGenericUser($user);
    }
679691
protected function acquireToken($tokenIdentifier)
    {
        $filtered = array_filter($this->tokens, function ($val) use ($tokenIdentifier) {
            return $val['token'] === $tokenIdentifier;
        });
        $keys = array_keys($filtered);
        $this->tokens[$keys[0]]['available'] = false;
    }
1193935
public static function getAddonByIdentifier(string $identifier)
    {
        foreach (self::getAddons() as $addon) {
            if ($addon->getIdentifier() == $identifier) {
                return $addon;
            }
        }
        
        return null;
    }
668199
public function retrieveByToken($identifier, $token)
    {
        $model = $this->createModel();

        return $model->newQuery()
            ->where($model->getAuthIdentifierName(), $identifier)
            ->where($model->getRememberTokenName(), $token)
            ->first();
    }
29577
public function findUserByToken($token)
    {
        $qb = $this->createQueryBuilder('user')
            ->where('user.passwordResetToken=:token');

        $query = $qb->getQuery();
        $query->setParameter('token', $token);

        return $query->getSingleResult();
    }
1242191
protected function getUserByToken($token)
    {
        return $this->sdkClient()
                    ->useCustomApiEndpoint($this->getEnvironmentEndpoint('api'))
                    ->setAccessToken($token)
                    ->uses('Profile')
                    ->get()
                    ->toArray();
    }
681242
public function get($token)
    {
        foreach ($this->getDbConnection()->fetchAll(
            'SELECT * FROM oauth_refresh_token
            WHERE refresh_token = :token', [
                'token' => $token
            ]
        ) as $row) {
            if ($row) {
                return (new RefreshTokenEntity($this->server))
                    ->setAccessTokenId($row['access_token'])
                    ->setExpireTime($row['expire_time'])
                    ->setId($row['refresh_token']);
            }
        }
        return null;
    }
236390
public function read(int $identifier): ?TokenInterface
    {
        try {
            return $this->readResource($identifier);
        } catch (RepositoryException $exception) {
            $message = 'Token reading failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }
613413
public function getRouteByIdentifier(int $identifier)
    {
        return isset($this->routes[$identifier])
            ? $this->routes[$identifier]
            : null;
    }
1233455
public function findByIdentifier($identifier)
    {
        if (!isset($this->plugins[$identifier])) {
            $identifier = $this->normalizeIdentifier($identifier);
        }

        if (!isset($this->plugins[$identifier])) {
            return null;
        }

        return $this->plugins[$identifier];
    }
1028560
public function verify($token, $identifier = null)
    {
        $identifier = ($identifier !== null) ? $identifier : $this->identifier;

        // Throw error for empty token or empty message id, because the server will not handle this
        if (empty($token)) {
            throw new Totp\EmptyTokenException();
        }
        if (empty($this->identifier)) {
            throw new Totp\EmptyIdentifierException();
        }

        try {
            $this->sendApiCall(self::ACTION_RETRIEVE, sprintf('totp/%s?token=%s', $identifier, $token));
        } catch (Exception $e) {
            if (Totp\Exception::isTotpException($e)) {
                throw new Totp\Exception($e);
            } else {
                throw $e;
            }
        }
    }
997142
public function identifier($identifier = null)
    {
        if (null === $identifier) {
            return $this->identifier;
        }

        $this->identifier = $identifier;
        return $this;
    }
196943
protected function findUserByToken(Token $token)
    {
        // retrieves the user ID from the token.
        $id = $token->getClaim('sub');

        // use the users provider to find the token subject (user)
        // but it's id (subject)
        return $this->provider->retrieveById($id);
    }
1242579
public function getRouteByName($identifier)
    {
        $id       = str_replace(self::DYNAMIC_PREFIX, '', $identifier);
        $resource = $this->repository->find($id);
        
        if ($resource instanceof Route) {
            return $this->createRoute($resource);
        }
        
        return null;
    }
1290264
public function get($identifier)
    {
        if (!isset($this->languages[$identifier])) {
            return null;
        }

        return $this->languages[$identifier];
    }