I’m a bit confused.
CWebUser::logout() clears session but leaves Yii::app()->user->id untouched.
Actually it leaves all the data (id, name, states) which was set by CWebUser::changeIdentity().
Yii::app()->user->isGuest() returns false.
It means that a code which uses Yii::app()->user after logout, still thinks the user is logged in.
Is it a bug that needs to be submitted or it’s me who is wrong?
how is that possible? probably you doing something wrong
This is the exact construction I execute.
I found that if I need to reuse session in the same script, I have to run Yii::app()->user->logout(false)…
And also I cannot use CHttpSession in unit tests. I’ve substituted it with CDbHttpSession.