changed Yii::app()->user->id to $this->getUserComponent()->getId();