remove all callback in customer class before saving it

This commit is contained in:
Manuel Raynaud
2014-03-13 17:10:21 +01:00
parent b0b0eac1cf
commit 613aac093e
2 changed files with 10 additions and 0 deletions

View File

@@ -147,6 +147,11 @@ class Customer extends BaseAction implements EventSubscriberInterface
public function login(CustomerLoginEvent $event)
{
$customer = $event->getCustomer();
if (method_exists($customer, 'clearDispatcher')) {
$customer->clearDispatcher();
}
$this->securityContext->setCustomerUser($event->getCustomer());
}