1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-20 19:52:09 +00:00

Merge remote-tracking branch 'origin/master' into 2.4

This commit is contained in:
Jeremy Benoist 2019-05-15 14:38:07 +02:00
commit 9f0957b831
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
26 changed files with 253 additions and 64 deletions

View file

@ -19,16 +19,16 @@ class SiteCredentialRepository extends \Doctrine\ORM\EntityRepository
/**
* Retrieve one username/password for the given host and userId.
*
* @param string $host
* @param int $userId
* @param array $hosts An array of host to look for
* @param int $userId
*
* @return array|null
*/
public function findOneByHostAndUser($host, $userId)
public function findOneByHostsAndUser($hosts, $userId)
{
$res = $this->createQueryBuilder('s')
->select('s.username', 's.password')
->where('s.host = :hostname')->setParameter('hostname', $host)
->where('s.host IN (:hosts)')->setParameter('hosts', $hosts)
->andWhere('s.user = :userId')->setParameter('userId', $userId)
->setMaxResults(1)
->getQuery()