protected function refreshUser(TokenInterface $token)
    {
        $user = $token->getUser();

        if (!$user instanceof UserInterface) {
            return;
        }

        $refreshedUser = $this->userProvider->refreshUser($user);
        $token->setUser($refreshedUser);

        return $token;
    }
protected function refreshUser(TokenInterface $token)
    {
        $user = $token->getUser();

        if (!$user instanceof UserInterface) {
            return;
        }

        $refreshedUser = $this->userProvider->refreshUser($user);
        $token->setUser($refreshedUser);

        return $token;
    }
protected function refreshUser ( TokenInterface $ token ) { $ user = $ token -> getUser ( ) ; if ( ! $ user instanceof UserInterface ) { return ; } $ refreshedUser = $ this -> userProvider -> refreshUser ( $ user ) ; $ token -> setUser ( $ refreshedUser ) ; return $ token ; }
Refreshes the user by reloading it from the user provider.
This method was copied from Symfony\Component\Security\Http\Firewall\ContextListener.

@param TokenInterface $token

@return TokenInterface|null

@throws \RuntimeException
Refreshes the user by reloading it from the user provider . This method was copied from Symfony \ Component \ Security \ Http \ Firewall \ ContextListener .