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