This is how I set sessions
$this -> sess = new Zend_Session_Namespace('user');
$this -> sess -> username = "Bob";
$this -> sess -> admin = "1";
And this is how I kill it
setcookie("mycookiename",md5(rand(10,1200)),time() - (60 * 60),"/",".site.com");
$_SESSION = array();
session_destroy();
$this -> _redirect('/');
but it still keeps the $this->sess->admin as '1' ... username is gone but admin stays as one. What's the correct way to delete ALL sessions associated with the client?
If I do
$this->sess->admin = 0;
Then it works, but I doubt this is the right way for each 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 it didn't work, it didn't close any sessions.