Srbac Gives Error Property "user.user_Id" Is Not Defined.

I am trying to open the Srbac Administration Web Interface

this is working fine for Managing auth items but giving following error on Assign to users and User’s assignments

Error Stack

CException

Property "User.user_ID" is not defined.

C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php(144)

132 */

133 public function __get($name)

134 {

135 if(isset($this->_attributes[$name]))

136 return $this->_attributes[$name];

137 else if(isset($this->getMetaData()->columns[$name]))

138 return null;

139 else if(isset($this->_related[$name]))

140 return $this->_related[$name];

141 else if(isset($this->getMetaData()->relations[$name]))

142 return $this->getRelated($name);

143 else

144 return parent::__get($name);

145 }

146

147 /**

148 * PHP setter magic method.

149 * This method is overridden so that AR attributes can be accessed like properties.

150 * @param string $name property name

151 * @param mixed $value property value

152 */

153 public function __set($name,$value)

154 {

155 if($this->setAttribute($name,$value)===false)

156 {

Stack Trace

#0

C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php(144): CComponent->__get("user_ID")

#1

C:\xampp\htdocs\yii\framework\web\helpers\CHtml.php(1809): CActiveRecord->__get("user_ID")

#2

C:\xampp\htdocs\yii\framework\web\helpers\CHtml.php(1772): CHtml::value(User, "user_ID")

#3

C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem\tabViews\roleToUser.php(42): CHtml::listData(array(User, User), "user_ID", "username")

37 <tr valign="top">

38 <td><?php

39 $criteria = new CDbCriteria();

40 $criteria->order = $this->module->username;

41 echo SHtml::activeDropDownList($this->module->getUserModel(),$this->module->userid,

42 SHtml::listData($this->module->getUserModel()->findAll($criteria), $this->module->userid, $this->module->username),

43 array(‘size’=>$this->module->listBoxNumberOfLines,‘class’=>‘dropdown’,‘ajax’ => array(

44 ‘type’=>‘POST’,

45 ‘url’=>array(‘getRoles’),

46 ‘update’=>’#roles’,

47 ‘beforeSend’ => 'function(){

#4

C:\xampp\htdocs\yii\framework\web\CBaseController.php(127): require("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…")

#5

C:\xampp\htdocs\yii\framework\web\CBaseController.php(96): CBaseController->renderInternal("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…", array("model" => AuthItem, "userid" => "", "message" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), true)

#6

C:\xampp\htdocs\yii\framework\web\CController.php(870): CBaseController->renderFile("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…", array("model" => AuthItem, "userid" => "", "message" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), true)

#7

C:\xampp\htdocs\yii\framework\web\widgets\CTabView.php(215): CController->renderPartial("tabViews/roleToUser", array("model" => AuthItem, "userid" => "", "message" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)))

#8

C:\xampp\htdocs\yii\framework\web\widgets\CTabView.php(147): CTabView->renderBody()

#9

C:\xampp\htdocs\yii\framework\web\CBaseController.php(174): CTabView->run()

#10

C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem\assign.php(57): CBaseController->widget("system.web.widgets.CTabView", array("tabs" => array("tab1" => array("title" => "Users", "view" => "tabViews/roleToUser"), "tab2" => array("title" => "Roles", "view" => "tabViews/taskToRole"), "tab3" => array("title" => "Tasks", "view" => "tabViews/operationToTask")), "viewData" => array("model" => AuthItem, "userid" => "", "message" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), "cssFile" => null))

52 Helper::publishCss($this->module->css);

53 $this->widget(‘system.web.widgets.CTabView’,

54 array(‘tabs’=>$tabs,

55 ‘viewData’=>array(‘model’=>$model,‘userid’=>$userid,‘message’=>$message,‘data’=>$data),

56 ‘cssFile’=>$this->module->getCssUrl(),

57 ));

58 ?>

59 </div>

60 </div>

61 <?php if($this->module->getShowFooter()) {

62 $this->renderPartial($this->module->footer);

#11

C:\xampp\htdocs\yii\framework\web\CBaseController.php(127): require("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…")

#12

C:\xampp\htdocs\yii\framework\web\CBaseController.php(96): CBaseController->renderInternal("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…", array("model" => AuthItem, "message" => "", "userid" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), true)

#13

C:\xampp\htdocs\yii\framework\web\CController.php(870): CBaseController->renderFile("C:\xampp\htdocs\trackstar\protected\modules\srbac\views\authitem…", array("model" => AuthItem, "message" => "", "userid" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), true)

#14

C:\xampp\htdocs\yii\framework\web\CController.php(783): CController->renderPartial("assign", array("model" => AuthItem, "message" => "", "userid" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)), true)

#15

C:\xampp\htdocs\trackstar\protected\modules\srbac\controllers\AuthitemController.php(217): CController->render("assign", array("model" => AuthItem, "message" => "", "userid" => "", "data" => array("userAssignedRoles" => array(), "userNotAssignedRoles" => array(), "roleAssignedTasks" => array(), "roleNotAssignedTasks" => array(), …)))

212 $this->render(‘assign’, array(

213 ‘model’ => $model,

214 ‘message’ => $this->_getMessage(),

215 ‘userid’ => $userid,

216 ‘data’ => $data

217 ));

218 } else {

219 // assign to user show the user tab

220 if ($userid != "") {

221 $this->_getTheRoles();

222 } else if ($assignTasks != 0 || $revokeTasks != 0) {

#16

C:\xampp\htdocs\yii\framework\web\actions\CInlineAction.php(50): AuthitemController->actionAssign()

#17

C:\xampp\htdocs\yii\framework\web\CController.php(309): CInlineAction->runWithParams(array("r" => "srbac/authitem/assign"))

#18

C:\xampp\htdocs\yii\framework\web\CController.php(287): CController->runAction(CInlineAction)

#19

C:\xampp\htdocs\yii\framework\web\CController.php(266): CController->runActionWithFilters(CInlineAction, array())

#20

C:\xampp\htdocs\yii\framework\web\CWebApplication.php(283): CController->run("assign")

#21

C:\xampp\htdocs\yii\framework\web\CWebApplication.php(142): CWebApplication->runController("srbac/authitem/assign")

#22

C:\xampp\htdocs\yii\framework\base\CApplication.php(162): CWebApplication->processRequest()

#23

C:\xampp\htdocs\trackstar\index.php(13): CApplication->run()

2012-10-09 20:49:11 Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Yii Framework/1.1.12

You don’t have a field named “user_ID” on your user table. You should probably configure srbac’s property “userid” to the name of the corresponding field you have on your table. Ref page 5 of its guide.