Browse Source

Bons cadeaux] Correctif filtre bons cadeaux

packProduct
Guillaume 2 years ago
parent
commit
74697bf8be
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      EventSubscriber/User/InitUserMerchantEventSubscriber.php
  2. +2
    -2
      Repository/Reduction/ReductionCreditRepositoryQuery.php

+ 2
- 2
EventSubscriber/User/InitUserMerchantEventSubscriber.php View File

@@ -36,7 +36,7 @@ class InitUserMerchantEventSubscriber implements EventSubscriberInterface

public function createUserMerchant(EntityManagerEvent $event)
{
$user = $event->getEntity();
/* $user = $event->getEntity();
$entityRepository = $this->em->getRepository(get_class($user));
if ($user instanceof UserInterface) {
$existingUser = $entityRepository->findOneByEmail($user->getEmail());
@@ -52,7 +52,7 @@ class InitUserMerchantEventSubscriber implements EventSubscriberInterface
);
$this->em->create($userMerchant);
}
}
}*/
}



+ 2
- 2
Repository/Reduction/ReductionCreditRepositoryQuery.php View File

@@ -44,13 +44,13 @@ class ReductionCreditRepositoryQuery extends AbstractRepositoryQuery
public function filterInactive()
{
$this->joinUsers();
return $this->having('COUNT(users.id) = 0');
return $this->andWhere('.users IS EMPTY');
}

public function filterActive()
{
$this->joinUsers();
return $this->having('COUNT(users.id) > 0');
return $this->andWhere('.users IS NOT EMPTY');
}

public function joinUsers()

Loading…
Cancel
Save