How do I destroy the zfcuser session variable manually within ZF2?

292 Views Asked by At

Does anyone know how to destroy the Zfcuser session variable?

If certain events occur I would like to end the session?

I checked the wiki and the only discussion is about setting automatic timeout. I would like to destroy the session manually.

1

There are 1 best solutions below

0
On

If you are going for a general logout function session_destroy(); should suffice, otherwise just use unset($_SESSION['zfcuser']);