Pessoal sou inciante no Yii e estou tendo um problema ao realizar o login em uma aplicação que estou desenvolvendo:
Aparece a seguinte mensagem: A propriedade "WebUser.tipo" não está definida.
e logo após a mensagem de erro:
/var/www/html/yii/framework/web/auth/CWebUser.php(140)
128
129 /**
130 * PHP magic method.
131 * This method is overriden so that persistent states can be accessed like properties.
132 * @param string $name property name
133 * @return mixed property value
134 */
135 public function __get($name)
136 {
137 if($this->hasState($name))
138 return $this->getState($name);
139 else
140 return parent::__get($name);
141 }
142
143 /**
144 * PHP magic method.
145 * This method is overriden so that persistent states can be set like properties.
146 * @param string $name property name
147 * @param mixed $value property value
148 */
149 public function __set($name,$value)
150 {
151 if($this->hasState($name))
152 $this->setState($name,$value);
Stack Trace
#0
+ /var/www/html/yii/framework/web/auth/CWebUser.php(140): CComponent->__get("tipo")
#1
– /var/www/html/dpgf/protected/modules/sgp/views/layouts/sgpLayout.php(57): CWebUser->__get("tipo")
52
53 )),
54
55 array('label'=>'Usuários', 'visible'=>Yii::app()->user->isGestor || Yii::app()->user->isSystemAdmin, 'url'=>array('/sgp/Usuario/index')),
56 array('label'=>'Relatórios', 'visible'=>Yii::app()->user->isGestor || Yii::app()->user->isSystemAdmin, 'url'=>array('/sgp/Relatorios/index')),
57 array('label'=>'Logout ('.Yii::app()->user->name.' - '.Yii::app()->user->tipo.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
58 ),
59 ));
60 ?>
61 </div><!-- mainmenu -->
62 <?php if(isset($this->breadcrumbs)):?>
#2
+ /var/www/html/yii/framework/web/CBaseController.php(126): require("/var/www/html/dpgf/protected/modules/sgp/views/layouts/sgpLayout...")
#3
+ /var/www/html/yii/framework/web/CBaseController.php(95): CBaseController->renderInternal("/var/www/html/dpgf/protected/modules/sgp/views/layouts/sgpLayout...", array("content" => " <div style="text-align: center; font-size: 13px; font-weight: b..."), true)
#4
+ /var/www/html/yii/framework/web/CController.php(784): CBaseController->renderFile("/var/www/html/dpgf/protected/modules/sgp/views/layouts/sgpLayout...", array("content" => " <div style="text-align: center; font-size: 13px; font-weight: b..."), true)
#5
– /var/www/html/dpgf/protected/modules/sgp/controllers/DefaultController.php(7): CController->render("index")
02
03 class DefaultController extends CController
04 {
05 public function actionIndex()
06 {
07 $this->render('index');
08 }
09
10 public function actionUserAutoComplete()
11 {
12 if (isset($_GET['term']))
#6
+ /var/www/html/yii/framework/web/actions/CInlineAction.php(49): DefaultController->actionIndex()
#7
+ /var/www/html/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("r" => "sgp/default/index"))
#8
+ /var/www/html/yii/framework/web/CController.php(286): CController->runAction(CInlineAction)
#9
+ /var/www/html/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#10
+ /var/www/html/yii/framework/web/CWebApplication.php(282): CController->run("index")
#11
+ /var/www/html/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("sgp/default/index")
#12
+ /var/www/html/yii/framework/base/CApplication.php(169): CWebApplication->processRequest()
#13
– /var/www/html/dpgf/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
Estranho que no meu local não esta apresentando esse erro, no servidor também estava funcionado tudo normal porém hoje apareceu esse erro … Alguém ai já teve um problema parecido?
Obrigado