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:
commit
9f0957b831
26 changed files with 253 additions and 64 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue