Exemplo n.º 1
0
 private function getAllDatasAboutUser($username)
 {
     $model = new ModelUser();
     $information_obj = $model->getAllDatasAboutUser($username)->fetch(PDO::FETCH_ASSOC);
     foreach ($information_obj as $key => $value) {
         $information[$key] = $value;
     }
     $information["profile_picture"] = $GLOBALS['working_dir'] . $information["profile_picture"];
     $information["banner_picture"] = $GLOBALS['working_dir'] . $information["banner_picture"];
     $information["nbPublications"] = $model->getNbPublication($username)->fetch(PDO::FETCH_OBJ)->result;
     $information["nbFollower"] = $model->getNbFollowers($username)->fetch(PDO::FETCH_OBJ)->result;
     $information["nbFollow"] = $model->getNbFollow($username)->fetch(PDO::FETCH_OBJ)->result;
     return $information;
 }