Add information to Yii::app()->user by extending CWebUser (better version)

Comparing #5 with #6

Revision #6 was created by emix emix on Aug 15, 2010, 4:34:28 PM.

code fix

Content

[...]
class WebUser extends CWebUser
{
public function __get($name)
{
if ($this->hasState('__userInfo')) {
$user=$this->getState('__userInfo'
,array());
if (isset($user[$name])) {
return $user[$name];
}
}
[...]