Sometimes when a user logs out and then clicks a link, when the link loads the user has been automatically logged back in. It is an intermittent problem, which is much more frequent if a link is clicked on very soon after the logout page has loaded - I use selenium IDE to run functional tests and these frequently break due to this problem.
The logout action is very simple:
public function actionLogout() {
if(Yii::app()->user->isGuest !== true) {
Yii::app()->user->logout();
}
$this->render('logout');
}
The only unusual thing about the site that could be causing the problem is that the site has an iframe running in a sub domain that uses the same server side codebase and login session. This iframe communicates with the server via ajax.
Could it be possible that if an ajax request is sent after the logout action but before the logout action returns, that its session data could be logging the user back in? If so what can I do about it?
I can't find anyone else having this problem and I would have thought that if this is the cause of the problem then it would be also caused by other tabs running ajax requests after the logout request.
If not this, any other ideas on what might be causing this?

Help












