I am trying to override the loginUrl for certain modules and it appears the setComponents is not working. In the module init function I have the following setting:
Thanks for the reply. Can you let me know where I can edit the user component of a module. The method I am trying now is being ignored and the user component settings from config/main.php is being used instead.
Each module has its own components. The way you are doing, you are creating a new component ‘user’ for your module
to override the application component user do the following
$component=Yii::createComponent(array(
//component details here
));
Yii::app()->setComponent('user',$component);
But I don’t think its a good idea override the application default component, a better way to do it is how I said, create a new user component for the module and use it instead