components->user->userAllowed(userID, $userID)) Rest_fatal_error(401, "You are not allowed to access this user posts !"); //Check if there is a startpoint for the posts if(isset($_POST['startFrom'])){ $startFrom = toInt($_POST['startFrom']); } else $startFrom = 0; //No start point //Get the post of the user $posts = CS::get()->components->posts->getUserPosts(userID, $userID, $startFrom); return $posts; } }