开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜