public function getBackendUsername(): ?string
    {
        $token = $this->getToken(BackendUser::SECURITY_SESSION_KEY);

        if (null === $token || !$token->getUser() instanceof BackendUser) {
            return null;
        }

        return $token->getUser()->getUsername();
    }
public function getBackendUsername(): ?string
    {
        $token = $this->getToken(BackendUser::SECURITY_SESSION_KEY);

        if (null === $token || !$token->getUser() instanceof BackendUser) {
            return null;
        }

        return $token->getUser()->getUsername();
    }
public function getBackendUsername ( ) : ? string { $ token = $ this -> getToken ( BackendUser :: SECURITY_SESSION_KEY ) ; if ( null === $ token || ! $ token -> getUser ( ) instanceof BackendUser ) { return null ; } return $ token -> getUser ( ) -> getUsername ( ) ; }
Gets the back end username from the session.
Gets the back end username from the session .