yii components - Yii::app()->getModule('user') is not returning the right value view/layout/main.php -
yii::app()->getmodule('user') not returning right value in view/layouts/main.php
i using yii-user yii-user extension manage user related features. when yii::app()->getmodule('user')->loginurl,
i
trying property of non-object
at
array('url'=>yii::app()->getmodule('user')->loginurl, 'label'=>yii::app()->getmodule('user')->t("login"), 'visible'=>yii::app()->user->isguest),
pls tell me whats going wrong, known issue or that.
here config/main.php
// autoloading model , component classes 'import'=>array( 'application.models.*', 'application.components.*', 'application.modules.user.models.*', 'application.modules.user.components.*', ), 'modules' => array( 'user'=>array( # enable debuging 'debug' => true, # encrypting method (php hash function) 'hash' => 'md5', # send activation email 'sendactivationmail' => true, # allow access non-activated users 'loginnotactiv' => false, # activate user on registration (only sendactivationmail = false) 'activeafterregister' => false, # automatically login registration 'autologin' => true, # registration path 'registrationurl' => array('/user/registration'), # recovery password path 'recoveryurl' => array('/user/recovery'), # login form path 'loginurl' => array('/user/login'), # page after login 'returnurl' => array('/user/profile'), # page after logout 'returnlogouturl' => array('/user/login'), # adding table refrences 'tableusers' => 'tbl_users', 'tableprofiles' => 'tbl_profiles', 'tableprofilefields' => 'tbl_profiles_fields', ), ),
i able solve exact issue removing had done install extension orginally , getting latest version github page on yii-user extension page.
i installed db schemea using no tbl_ prefix while following guide. http://www.benjaminlhaas.com/blog/installing-yii-users-and-rights-5-steps
however, had install db schema rights manually work.
if have other questions feel free ask!
Comments
Post a Comment