Revision #8 has been created by Anas AbuDayah on Mar 13, 2014, 9:40:46 AM with the memo:
add getId function, add tags
« previous (#7)
Changes
Title
unchanged
Add information to Yii::app()->user by extending CWebUser (better version)
Category
unchanged
Tutorials
Yii version
unchanged
Tags
changed
Yii, user, rbac
Content
changed
[...]
}
public function login($identity, $duration) {
$this->setState('__userInfo', $identity->getUser());
parent::login($identity, $duration);
}
/*
* Required to checkAccess function
* Yii::app()->user->checkAccess('operation')
*/
public function getId()
{
return $this->id;
}
}
?>
```
remember to set that class as Yii::app()->user class:[...]