if (!filter_var($userObject->id, FILTER_VALIDATE_INT)) {
            throw new Exception("Invalid user ID");
        }