Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear session when leave controller in zend framework?

Assume that I'm in indexAction of IndexController. I stored some data in session. Now I want to clear all session when I move to another controller, let's say that ExampleController. How can I do that?

like image 472
Nấm Lùn Avatar asked Aug 09 '11 07:08

Nấm Lùn


1 Answers

If you want to clear all Session namespaces:

Zend_Session::destroy();

To clear one specific nameSpace:

 Zend_Session::namespaceUnset('default');
like image 125
opHASnoNAME Avatar answered Sep 19 '22 22:09

opHASnoNAME