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!