3 namespace Wallabag\CoreBundle\Repository
;
6 * SiteCredentialRepository.
8 class SiteCredentialRepository
extends \Doctrine\ORM\EntityRepository
11 * Retrieve one username/password for the given host and userId.
18 public function findOneByHostAndUser($host, $userId)
20 return $this->createQueryBuilder('s')
21 ->select('s.username', 's.password')
22 ->where('s.host = :hostname')->setParameter('hostname', $host)
23 ->andWhere('s.user = :userId')->setParameter('userId', $userId)
26 ->getOneOrNullResult();