CWebuser::logout(true) won't work on multiple subdomains

For some reason when the i use


Yii::app()->user->login($identity);

and then when i want to log the member out i do


Yii::app()->user->logout(true);

it works. But when i do:


Yii::app()->user->login($identity, 60 * 60 * 24);

and then use this to logout the member


Yii::app()->user->logout(true);

it won’t work the member keeps on being logged in. No way for me to delete the cookie saved. For some reason it won’t delete the cookie or it does and then restores it back.

I use subdomains on my application and the member stays logged in across the subdomains but i can’t seem to log him out.

BTW when i try to logout while i am in en.testing.com it creates anoter cookie on the domain en.testing.com while i already have the same exact cookie with the same name on the .testing.com domain.

Any ideas?

See ticket and my workaround.

Cheers. Strange i read that topic but probably missed that code snippet.