Explorar el Código

Correctif isUserSubscribedOneNewsletter()

feature/rotating_product
Guillaume Bourgeois hace 4 meses
padre
commit
a895f7b86d
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. +5
    -1
      domain/User/User/NewsletterManager.php

+ 5
- 1
domain/User/User/NewsletterManager.php Ver fichero

@@ -32,8 +32,12 @@ class NewsletterManager extends AbstractService implements ManagerInterface
return false;
}

public function isUserSubscribedOneNewsletter(User $user): bool
public function isUserSubscribedOneNewsletter(User $user = null): bool
{
if(!$user) {
return false;
}
return $this->isUserSubscribedNewsletter($user, Email::TYPE_NEWSLETTER)
|| $this->isUserSubscribedNewsletter($user, Email::TYPE_ORDER_TAKING);
}

Cargando…
Cancelar
Guardar