Skip to content

Commit

Permalink
use token storage, fixes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
MDevster committed Aug 1, 2024
1 parent 3aada63 commit e47704e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EventListener/PageBreadcrumbListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Doctrine\DBAL\Connection;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;

/**
* Overrides the default breadcrumb menu, we want to show folder pages before root pages.
Expand All @@ -29,7 +29,7 @@ class PageBreadcrumbListener
public function __construct(
private readonly Connection $connection,
private readonly RequestStack $requestStack,
private readonly Security $security,
private readonly TokenStorageInterface $tokenStorage,
) {
}

Expand Down Expand Up @@ -74,7 +74,7 @@ private function addBreadcrumb(): void

$arrIds = [];
$arrLinks = [];
$objUser = $this->security->getUser();
$objUser = $this->tokenStorage->getToken()?->getUser();

if (!$objUser instanceof BackendUser) {
return;
Expand Down

0 comments on commit e47704e

Please sign in to comment.