There is a class profile , in it a method for receiving comments of the current user:
private function getComments(){ $comments = $this->comments_model->GetCommentsLov(array('limit' => $this->climit, 'IdToUser' => $this->idUser)); $this->data['comments'] = $this->commentsuser->SetCommentsFields(null, 5, $comments, $this->idUser); $this->data['viewSection'] = 'comments/item'; } Each user has his own profile type private $ typeProfile; Depending on which, you need to upload comments related to this profile. T-in the method getComments () to access another methods of the model $ this-> comments_model;
How can this be beautifully done?