Module Based Login And User Level Acces System

i have implemented module based login from

by update 2 method and it works fine for me .

Now there is need to access this module as different role,

i implement user level access to this module as described here

i add LevelLookUp class to EWebUser.

when i try to login now a CException

"CWebUser and its behaviors do not have a method or closure named "isAdmin". "


it means module is still using CWebUser, but i create my own EWebUser and place it to module/components/EWebUser.php

and code in module config file init method







                    'errorHandler' => array(

                        'errorAction' => 'bgadmin/default/error'),

                    'user' => array(

                        //'class' => 'CWebUser',

                        'class' => 'EWebUser',

                        'loginUrl' => Yii::app()->createUrl('bgadmin/default/index'),




1.why module is still using CWebuser instead of EWebUser ?


when i change




then it access the EwebUser but not the loginurl as i logged in but now 2 PROBLEMS

1.‘expression’=>‘Yii::app()->user->isAdmin()’ not works but in class EwebUser it return flase.

2.when logout give error "Property "BgadminModule.user" is not defined. "

logout code is



in previous case logout was working fine.

Please help me.

Could you post EWebUser class code here if possible?. Check your EWebuser class whether it extends CWebUser