Przeglądaj źródła

Bons cadeaux] Correctif filtre bons cadeaux

packProduct
Guillaume 3 lat temu
rodzic
commit
74697bf8be
2 zmienionych plików z 4 dodań i 4 usunięć
  1. +2
    -2
      EventSubscriber/User/InitUserMerchantEventSubscriber.php
  2. +2
    -2
      Repository/Reduction/ReductionCreditRepositoryQuery.php

+ 2
- 2
EventSubscriber/User/InitUserMerchantEventSubscriber.php Wyświetl plik

@@ -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 Wyświetl plik

@@ -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()

Ładowanie…
Anuluj
Zapisz