2

How can I restart session when a user clicks anywhere? I created a request listerner:

public function onKernelRequest(GetResponseEvent $event)
    {
        $session = new Session();
        $session->start();
        //$event->getRequest()->getSession()->start();
    }

Thanks.

2 Answers 2

4

I think you're actually after:

$session->invalidate(); 

Right?

Sign up to request clarification or add additional context in comments.

Comments

4

working correctly.

public function onKernelRequest(GetResponseEvent $event)
{
    $event->getRequest()->getSession()->migrate();
}

thanks.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.