public function profilView($id) { $manager = new ProfilManager(); $manager2 = new Wusers_tagManager(); $profil = $manager->getUserProfil($id); $badges = $manager2->getUserLevel($id); //$this->allowTo('user'); $this->show('default/profil', ['profil' => $profil, 'badges' => $badges]); }
public function orderBy($orderby) { $manager = new QuestionManager(); $manager2 = new TagManager(); $manager3 = new ProfilManager(); $questions = $manager->getAllQuestions($orderby); $tags = array(); foreach ($questions as $value) { $tags[] = $manager2->getTags($value['id']); } $profils = $manager3->getAllUsers(); $this->show('default/home', ['questions' => $questions, 'tags' => $tags, 'profils' => $profils, 'orderby' => $orderby]); }
public function logout() { $manager2 = new ProfilManager(); $manager2->userIsOffline($_SESSION['user']['id']); $auth = new AuthentificationManager(); $auth->logUserOut(); $this->redirectToRoute('home'); }