mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
29 lines
705 B
PHP
29 lines
705 B
PHP
<?php
|
|
|
|
namespace Repositories;
|
|
|
|
use Doctrine\ORM\EntityRepository;
|
|
|
|
/**
|
|
* UsrAuthProvider
|
|
*
|
|
* This class was generated by the Doctrine ORM. Add your own custom
|
|
* repository methods below.
|
|
*/
|
|
class UsrAuthProviderRepository extends EntityRepository
|
|
{
|
|
public function findWithProviderAndId($providerId, $distantId)
|
|
{
|
|
$dql = 'SELECT u
|
|
FROM Entities\UsrAuthProvider u
|
|
WHERE u.provider = :providerId AND u.distant_id = :distantId';
|
|
|
|
$params = array('providerId' => $providerId, 'distantId' => $distantId);
|
|
|
|
$query = $this->_em->createQuery($dql);
|
|
$query->setParameters($params);
|
|
|
|
return $query->getOneOrNullResult();
|
|
}
|
|
}
|