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

For some reason when the i use


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


it works. But when i do:

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

and then use this to logout the member


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 it creates anoter cookie on the domain while i already have the same exact cookie with the same name on the domain.

Any ideas?

See ticket and my workaround.

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