Using protected member $securityContext instez of a protected getter
This commit is contained in:
@@ -127,7 +127,7 @@ class Customer extends BaseAction implements EventSubscriberInterface
|
|||||||
|
|
||||||
public function login(CustomerLoginEvent $event)
|
public function login(CustomerLoginEvent $event)
|
||||||
{
|
{
|
||||||
$this->getSecurityContext()->setCustomerUser($event->getCustomer());
|
$this->securityContext->setCustomerUser($event->getCustomer());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -137,17 +137,7 @@ class Customer extends BaseAction implements EventSubscriberInterface
|
|||||||
*/
|
*/
|
||||||
public function logout(ActionEvent $event)
|
public function logout(ActionEvent $event)
|
||||||
{
|
{
|
||||||
$this->getSecurityContext()->clearCustomerUser();
|
$this->securityContext->clearCustomerUser();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the security context
|
|
||||||
*
|
|
||||||
* @return \Thelia\Core\Security\SecurityContext
|
|
||||||
*/
|
|
||||||
protected function getSecurityContext()
|
|
||||||
{
|
|
||||||
return $this->securityContext;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user