Yii Returnurl Timing Issue

Hi all,

I’ve got a strange bug I could do with some help with.

My application polls a YII controller route near continuously. When a user logs out, and the logs back in they are directed to this route due to the Yii::app()->controller->module->returnUrl parameter being set.

So

–> User views page which hits route continuously

–> User logs out

–> Last request hits route which is hit continuously and the returnUrl parameter is set.

–> User logs in and is taken to incorrect route.

Is there anything I can do to prevent this?

Thanks in advance,

Alan

p.s this happens because the route is loaded in an img src tag <img src=‘controller/route’> which means the getIsAjaxRequest() function fails…

Idea 1

Overload CHTTPRequest getIsAjaxRequest() method and in there specifically check if it’s that route.