Conflict In Two Module Config

Hi All

suppose i am using two modules in my project.

for example :

1-"Auth" module for manage access control that need following config(set special class of module for class value) :





  'components' => array(

       .........

        'user' => array(

     'class' => 'application.modules.user.components.AuthWebUser',

            'allowAutoLogin' => true,




        ),




2-"user" module for user manage that need following config (set special class of module for class value) :





  'components' => array(

       .........

        'user' => array(

          'class' => 'application.modules.Auth.components.YumWebUser',

            'allowAutoLogin' => true,




        ),




witch value should set for class in main config.php in project?




...

'class' => 'application.modules.Auth.components.YumWebUser',

...



or




..

'class' => 'application.modules.user.components.AuthWebUser',

...



Hi if you want to create a two module so basically create the two class and call them separately what you are using module.

see ex…





       'admin' => array(

            'allowAutoLogin' => true,

            'autoUpdateFlash' => true,

            'class' => 'AdminRWebUser',

            'loginUrl' => array('/admin/login'),

            'fullname' => '',

        ),

        'customer' => array(

            'allowAutoLogin' => true,

            'autoUpdateFlash' => true,

            'class' => 'CustomerRWebUser',

            'loginUrl' => array('/customer/index'),

        ),

In ex when I call a admin module AdminRWebUser class call similar customer module call a CustomerRWebUser class call.

I hope it’s some help.

Hi

Tanks for your Reply.

I found this solution :

Each macule has init() in modules/modulename/…modules class that initial module and I set some config in this function in each module separately:




 public function init() {

        Yii::app()->configure(array(

                   'theme' => 'blackOrange',


            'language' => 'fa',

            'components' => array(

                 'coreMessages' => array(

                     'basePath' => $this->basePath . '\messages',

                ),

                'messages' => array(

                    'class' => 'CPhpMessageSource',

                    'basePath' => $this->basePath . '\messages',

                ),

              

            ),

        ));