src/Graviton/SecurityBundle/Service/SecurityUtils.php
public function isSecurityUser()
    {
        if ($this->securityUser) {
            return true;
        }
        
        /** @var PreAuthenticatedToken $token */
        if (($token = $this->tokenStorage->getToken())
            && ($user = $token->getUser()) instanceof UserInterface ) {
            $this->securityUser = $user;
            return true;
        }
        return false;
    }
public function isSecurityUser()
    {
        if ($this->securityUser) {
            return true;
        }
        
        /** @var PreAuthenticatedToken $token */
        if (($token = $this->tokenStorage->getToken())
            && ($user = $token->getUser()) instanceof UserInterface ) {
            $this->securityUser = $user;
            return true;
        }
        return false;
    }
public function isSecurityUser ( ) { if ( $ this -> securityUser ) { return true ; } /** @var PreAuthenticatedToken $token */ if ( ( $ token = $ this -> tokenStorage -> getToken ( ) ) && ( $ user = $ token -> getUser ( ) ) instanceof UserInterface ) { $ this -> securityUser = $ user ; return true ; } return false ; }
Check if there is a security user

@return bool
Check if there is a security user