Explorar el Código

Bons cadeaux] Correctif filtre bons cadeaux

packProduct
Guillaume hace 3 años
padre
commit
74697bf8be
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. +2
    -2
      EventSubscriber/User/InitUserMerchantEventSubscriber.php
  2. +2
    -2
      Repository/Reduction/ReductionCreditRepositoryQuery.php

+ 2
- 2
EventSubscriber/User/InitUserMerchantEventSubscriber.php Ver fichero

@@ -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 Ver fichero

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

Cargando…
Cancelar
Guardar