Skip to content

Commit

Permalink
AuthenticationLogoutListener - do not use session configurators - (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Aug 17, 2022
1 parent 12a7aa6 commit 9ab2ad4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EventListener/AuthenticationLogoutListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use Pimcore\Bundle\AdminBundle\Security\Event\LogoutListener;
use Pimcore\Bundle\EcommerceFrameworkBundle\EnvironmentInterface;
use Pimcore\Bundle\EcommerceFrameworkBundle\Tools\SessionConfigurator;
use Pimcore\Bundle\EcommerceFrameworkBundle\EventListener\SessionBagListener;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand All @@ -33,7 +33,7 @@ class AuthenticationLogoutListener extends LogoutListener
{
public function __construct(
protected EnvironmentInterface $environment,
protected SessionConfigurator $sessionConfigurator,
protected SessionBagListener $sessionBagListener,
protected SessionInterface $session,
protected TokenStorageInterface $tokenStorage,
protected RouterInterface $router,
Expand All @@ -53,7 +53,7 @@ public function onLogoutSuccess(Request $request): RedirectResponse|Response
$this->environment->save();

// clear complete e-commerce framework session
$this->sessionConfigurator->clearSession($this->session);
$this->sessionBagListener->clearSession($this->session);

// call parent in order to return correct redirect
return parent::onLogoutSuccess($request);
Expand Down

0 comments on commit 9ab2ad4

Please sign in to comment.