extension question,YiiFramework
I use the mod开发者_开发技巧ule user
http://yiiframework.com/extension/yii-user/
then open localhost/testdrive and get an error - trying to get property of non-object
on line - array('url'=>Yii::app()->getModule('user')->loginUrl,
did everything according to instructions from the link
Maybe you should add 'class' parameter to 'user' to configuration in main.php, ie:
'components'=>array(
'user' => array(
'class' => 'application.components.WebUser',
'allowAutoLogin' => true,
'loginUrl' => array('/ua/user/login'),
)...
I figured out why this was happening to me, too. I had put the block at the end of main.php. If you put it at the beginning, the problem goes away.
精彩评论