public function viewUsr($usr) { Utils::isLogged(); $id = User::getUserIDByName($usr); if ($id === -1) { Utils::isLogged(); $id_h = Utils::getUserID(); $user_h = User::getUser($id_h); $pro = Projects::getProjectsProfile($id_h); return View::make("error404")->with('details_header', $user_h)->with('projects', $pro); } $id_h = Utils::getUserID(); if ($id == $id_h) { return $this->index(); } $user = User::getUser($id); $user_h = User::getUser($id_h); return $this->getView($id, $user, $user_h); }