Commit 369793d7 by Damien Moulard

don't return disabled adherents

parent ab46fc60
...@@ -46,7 +46,7 @@ class AdherentRepository extends ServiceEntityRepository ...@@ -46,7 +46,7 @@ class AdherentRepository extends ServiceEntityRepository
$qb = $this->createQueryBuilder('p'); $qb = $this->createQueryBuilder('p');
return $qb return $qb
->leftjoin('p.user', 'u') ->leftjoin('p.user', 'u')
->where('p.enabled = :enabled') ->where('u.enabled = :enabled')
->setParameter('enabled', true) ->setParameter('enabled', true)
->orderBy('u.lastname', 'ASC') ->orderBy('u.lastname', 'ASC')
->getQuery() ->getQuery()
...@@ -63,7 +63,7 @@ class AdherentRepository extends ServiceEntityRepository ...@@ -63,7 +63,7 @@ class AdherentRepository extends ServiceEntityRepository
return $qb return $qb
->leftjoin('p.user', 'u') ->leftjoin('p.user', 'u')
->where('p.id != :presta') ->where('p.id != :presta')
->andWhere('p.enabled = :enabled') ->andWhere('u.enabled = :enabled')
->setParameter('presta', $adherent->getId()) ->setParameter('presta', $adherent->getId())
->setParameter('enabled', true) ->setParameter('enabled', true)
->orderBy('u.lastname', 'ASC') ->orderBy('u.lastname', 'ASC')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment