…the states stored via CBaseUserIdentity::setState will be saved in the cookie as well.
But if you use this method, variables are not stored in the $_COOKIE.
The CWebUser::setState method code is as follows:
public function setState($key,$value,$defaultValue=null)
{
$key=$this->getStateKeyPrefix().$key;
if($value===$defaultValue)
unset($_SESSION[$key]);
else
$_SESSION[$key]=$value;
}
As you can see from the code, stored in the $_COOKIE is not there.