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?
If you want to clear all Session namespaces:
Zend_Session::destroy();
To clear one specific nameSpace:
Zend_Session::namespaceUnset('default');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With