public function alerts() { //A FAIRE $user = $this->getUser(); $challengeManager = new ChallengeManager(); //affiche la notification de défi $user["challenges"] = $challengeManager->getUserChallenges($id_defender); $this->show('user/toeteam', ['title' => "toetter | fil d'actualité"]); $this->show('user/profile', ['title' => "toetter | ton profil"]); $this->show('user/editProfile', ['title' => "toetter | modifie ton profil"]); }
public function profile($id) { //page profil $userManager = new UserManager(); $user = $userManager->find($id); $hobbyManager = new HobbyManager(); //affiche les "hobbys" $user["hobbys"] = $hobbyManager->getUserHobbies($id); $challengeManager = new ChallengeManager(); //affiche les photos des défis dans page profil $user["challenges"] = $challengeManager->getUserChallenges($id); $this->show('user/profile', ['title' => "toetter | ton profil", 'user' => $user]); }