Help ? something to include for hasRole

Hi there, would you help me,

I tried to use "hasRole" code but does not work, it shows the following error:

Although login and user/role management seems to work. In the user/role management page, this hasRole function does work. Maybe I have to add some line in the configuration files?


YiiBase::include(Role.php) [<a href=‘yiibase.include’>yiibase.include</a>]: failed to open stream: No such file or directory

<?php $this->widget('zii.widgets.CMenu',array(


	array('label'=>'Home', 'url'=>array('/site/index')),

	array('label'=>'Employee', 'url'=>array('/employee')),

	array('label'=>'Contact', 'url'=>array('/site/contact')),

	array('label'=>'Login', 'url'=>array('/user/user/login'), 'visible'=>Yii::app()->user->isGuest),

	array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),

	array('label'=>'User Management', 'url'=>array('/user/user/admin'), 'visible'=>User::hasRole('admin'))




yii version is 1.1.3 and User Management Module version is 0.4.

Thanks, hidenori

Sorry, self-resolved.

In protected/config/main.php, I mistyped the following:




as user.modules.*

After fixed, it worked.