This is how I set up the sessions
$this -> sess = new Zend_Session_Namespace('user'); $this -> sess -> username = "Bob"; $this -> sess -> admin = "1";
And this is how I kill him
setcookie("mycookiename",md5(rand(10,1200)),time() - (60 * 60),"/",".site.com"); $_SESSION = array(); session_destroy(); $this -> _redirect('/');
but it still saves $ this-> sess-> admin as "1" ... the username is gone, but the administrator remains as one. What is the right way to delete ALL client related sessions?
If i do
$this->sess->admin = 0;
It then works, but I doubt it is the right way for every session variable that I hold.
I also tried
setcookie("mycookiename",md5(rand(10,1200)),time() - (60 * 60),"/",".site.com"); Zend_Session::namespaceUnset($this->sess);
and he did not work, he did not close the sessions.
Darius
source share