Skip to content

Commit

Permalink
Fixes UserInterface usage in TokenStorageUserProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienHarper committed Dec 13, 2018
1 parent 45a5802 commit b35d67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DoctrineAuditBundle/User/TokenStorageUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace DH\DoctrineAuditBundle\User;

use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserInterface as BaseUserInterface;

class TokenStorageUserProvider implements UserProviderInterface
{
Expand All @@ -21,7 +21,7 @@ public function getUser(): ?UserInterface

if (null !== $token) {
$tokenUser = $token->getUser();
if ($tokenUser instanceof UserInterface) {
if ($tokenUser instanceof BaseUserInterface) {
$user = new User($tokenUser->getId(), $tokenUser->getUsername());
}
}
Expand Down

0 comments on commit b35d67b

Please sign in to comment.