<?php
class AssistantWebUser extends CWebUser
{
    public function __get($name)
    {
        if ($this->hasState('__assistantInfo')) {
            $user=$this->getState('__assistantInfo',array());
            if (isset($user[$name])) {
                return $user[$name];
            }
        }

        return parent::__get($name);
    }

    public function login($identity, $duration) {
        $this->setState('__assistantInfo', $identity->getUser());
        parent::login($identity, $duration);
    }
}

?>