main/core/Listener/AuthenticationSuccessListener.php
public function checkTermOfServices(GetResponseEvent $event)
    {
        if ('prod' === $this->kernel->getEnvironment() && $event->isMasterRequest()) {
            $user = !empty($this->tokenStorage->getToken()) ? $this->tokenStorage->getToken()->getUser() : null;
            if ($user instanceof User && $this->configurationHandler->getParameter('terms_of_service')) {
                $this->showTermOfServices($event);
            }
        }
    }
public function checkTermOfServices(GetResponseEvent $event)
    {
        if ('prod' === $this->kernel->getEnvironment() && $event->isMasterRequest()) {
            $user = !empty($this->tokenStorage->getToken()) ? $this->tokenStorage->getToken()->getUser() : null;
            if ($user instanceof User && $this->configurationHandler->getParameter('terms_of_service')) {
                $this->showTermOfServices($event);
            }
        }
    }
public function checkTermOfServices ( GetResponseEvent $ event ) { if ( 'prod' === $ this -> kernel -> getEnvironment ( ) && $ event -> isMasterRequest ( ) ) { $ user = ! empty ( $ this -> tokenStorage -> getToken ( ) ) ? $ this -> tokenStorage -> getToken ( ) -> getUser ( ) : null ; if ( $ user instanceof User && $ this -> configurationHandler -> getParameter ( 'terms_of_service' ) ) { $ this -> showTermOfServices ( $ event ) ; } } }
Checks the current user has accepted term of services if any before displaying platform.

@DI\Observe("kernel.request")

@param GetResponseEvent $event
Checks the current user has accepted term of services if any before displaying platform .