I cann't find the declaration of getModule function in the yii framework (1.1.10).

I cann’t find the declaration of getModule function in the yii framework (1.1.10).

I am trying to add the yii-user ext in my project and get the following message:

=======================================

"Trying to get property of non-object"

the detailed info as below:

<div id="loginout">

63 <?php $this->widget(‘zii.widgets.CMenu’,array(

64 ‘items’=>array(

66 array(‘url’=>Yii::app()->getModule(‘user’)->loginUrl, <— ERROR

67 ‘label’=>Yii::app()->getModule(‘user’)->t(“Login”),

68 ‘visible’=>Yii::app()->user->isGuest),

69 array(‘url’=>Yii::app()->getModule(‘user’)->registrationUrl, ‘label’=>Yii::app()->getModule(‘user’)->t(“Register”), ‘visible’=>Yii::app()->user->isGuest),

70 array(‘url’=>Yii::app()->getModule(‘user’)->profileUrl, ‘label’=>Yii::app()->getModule(‘user’)->t(“Profile”), ‘visible’=>!Yii::app()->user->isGuest),

71 array(‘url’=>Yii::app()->getModule(‘user’)->logoutUrl, ‘label’=>Yii::app()->getModule(‘user’)->t(“Logout”).’ (’.Yii::app()->user->name.’)’, ‘visible’=>!Yii::app()->user->isGuest),

72

73 ),)); ?>

======================================

it looks like the app cann’t find the user module, right?

Thanks in advance!

Did you add the user module info to your protected/config/main.php file?

Yes, I follow the installation step of yii-user.

i am sure you have not properly configure your config/main.php that’s why you are

facing this problem