Directing a user to last page accessed

what need to be done for redirecting a user to last page accessed after session expired??

Thanks

You could extend CHttpRequest and store the current route in the database with the user data. After login you can redirect the user to the route stored in the database.

You can try something like this:


<?php

$request=Yii::app()->getRequest();

if(!$request->getIsAjaxRequest())

	Yii::app()->user->setReturnUrl($request->getUrl());

?>