returnUrl + module

In documentation it fails to mention what will the returnUrl defaults to if loginRequired isn't called. Currently it redirects to the default controller, but it doesn't take in consideration the current module. Will this be a feature added in next revisions? Or do I need to overload CWebUser::getReturnUrl?

I propose the following solution in CWebUser:



public function getReturnUrl()


		$controller = Yii::app()->controller;

		$url = Yii::app()->createUrl($controller->module->id . '/' . $controller->module->defaultController . '/' . $controller->defaultAction);


		return $this->getState('_returnUrl', $url);




You can set 'returnUrl' in application configuration.

Are you proposing to set it individually for each module?

No, I mean you can configure returnUrl in your app config using: