Connector/IdentityService/Storage/DatabaseIdentityServiceStorage.php
public function findOneBy(array $criteria = [])
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->from($this->table, 'identity');
        $queryBuilder->select([
            'identity.objectIdentifier',
            'identity.objectType',
            'identity.adapterIdentifier',
            'identity.adapterName',
        ]);
        $queryBuilder->setMaxResults(1);

        foreach ($criteria as $key => $value) {
            $queryBuilder->andWhere($queryBuilder->expr()->eq($key, ':' . $key));
            $queryBuilder->setParameter(':' . $key, $value);
        }

        $result = $queryBuilder->execute()->fetch();

        if (!empty($result)) {
            return Identity::fromArray([
                'objectIdentifier' => $result['objectIdentifier'],
                'objectType' => $result['objectType'],
                'adapterIdentifier' => $result['adapterIdentifier'],
                'adapterName' => $result['adapterName'],
            ]);
        }

        return null;
    }
public function findOneBy(array $criteria = [])
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder->from($this->table, 'identity');
        $queryBuilder->select([
            'identity.objectIdentifier',
            'identity.objectType',
            'identity.adapterIdentifier',
            'identity.adapterName',
        ]);
        $queryBuilder->setMaxResults(1);

        foreach ($criteria as $key => $value) {
            $queryBuilder->andWhere($queryBuilder->expr()->eq($key, ':' . $key));
            $queryBuilder->setParameter(':' . $key, $value);
        }

        $result = $queryBuilder->execute()->fetch();

        if (!empty($result)) {
            return Identity::fromArray([
                'objectIdentifier' => $result['objectIdentifier'],
                'objectType' => $result['objectType'],
                'adapterIdentifier' => $result['adapterIdentifier'],
                'adapterName' => $result['adapterName'],
            ]);
        }

        return null;
    }
{@inheritdoc}