Exemple #1
0
 public function login(CustomerLoginEvent $event)
 {
     $customer = $event->getCustomer();
     if (method_exists($customer, 'clearDispatcher')) {
         $customer->clearDispatcher();
     }
     $this->securityContext->setCustomerUser($event->getCustomer());
 }
Exemple #2
0
 public function loadCustomer()
 {
     $customer = CustomerQuery::create()->findOne();
     if (null === $customer) {
         return null;
     }
     $this->securityContext->setCustomerUser($customer);
     return $customer;
 }