View->render('profile/index', array( 'users' => UserModel::getPublicProfilesOfAllUsers()) ); } /** * This method controls what happens when you move to /overview/showProfile in your app. * Shows the (public) details of the selected user. * @param $user_id int id the the user */ public function showProfile($user_id) { if (isset($user_id)) { $this->View->render('profile/showProfile', array( 'user' => UserModel::getPublicProfileOfUser($user_id)) ); } else { Redirect::home(); } } }