Is calling logout destroys all session? For some reasons, one of the value in the session disappeared when I logout. I don’t expecting this behavior but it’s happening.
Is calling logout destroys all session? For some reasons, one of the value in the session disappeared when I logout. I don’t expecting this behavior but it’s happening.
Apparently, it does by default:
public function logout($destroySession=true)
{
if($this->beforeLogout())
{
if($this->allowAutoLogin)
{
Yii::app()->getRequest()->getCookies()->remove($this->getStateKeyPrefix());
if($this->identityCookie!==null)
{
$cookie=$this->createIdentityCookie($this->getStateKeyPrefix());
$cookie->value=null;
$cookie->expire=0;
Yii::app()->getRequest()->getCookies()->add($cookie->name,$cookie);
}
}
if($destroySession)
Yii::app()->getSession()->destroy();
else
$this->clearStates();
$this->afterLogout();
}
}