CException

Property "CWebUser.accessrole_id" is not defined.

/var/www/html/framework/web/auth/CWebUser.php(141)

129 
130     /**
131      * PHP magic method.
132      * This method is overriden so that persistent states can be accessed like properties.
133      * @param string $name property name
134      * @return mixed property value
135      */
136     public function __get($name)
137     {
138         if($this->hasState($name))
139             return $this->getState($name);
140         else
141             return parent::__get($name);
142     }
143 
144     /**
145      * PHP magic method.
146      * This method is overriden so that persistent states can be set like properties.
147      * @param string $name property name
148      * @param mixed $value property value
149      */
150     public function __set($name,$value)
151     {
152         if($this->hasState($name))
153             $this->setState($name,$value);

Stack Trace

#1
+
 /var/www/html/protected/controllers/CourseMaterialController.php(42): CWebUser->__get("accessrole_id")
37 
38 $action=Yii::app()->controller->action->id;
39 
40 //echo $module."_".$controller."_".$action;
41 
42 $accessrole_id=Yii::app()->user->accessrole_id;
43 
44 //echo Yii::app()->user->name;//die();
45 
46 $auh_access=AuthUserRoleAccess::model()->findByAttributes(array('role_id'=>$accessrole_id,'module'=>$module,'controller'=>$controller,'action'=>$action));
47 
#10
+
 /var/www/html/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();
14 
15 
16 
2024-03-29 02:20:07 Apache/2.4.6 (CentOS) PHP/5.6.40 Yii Framework/1.1.9