/** * Validates the given item's user id is identical to the user id on the KS * @param SimpleXMLElement $item */ protected function validateItem(SimpleXMLElement $item) { if ($this->dropFolder->shouldValidateKS) { if (!isset($item->userId) && $this->ksInfo->sessionType == KalturaSessionType::USER) { throw new KalturaBulkUploadXmlException("Drop Folder is set with KS validation but no user id was provided", KalturaBatchJobAppErrors::BULK_ITEM_VALIDATION_FAILED); } if ($item->userId != $this->ksInfo->userId && $this->ksInfo->sessionType == KalturaSessionType::USER) { throw new KalturaBulkUploadXmlException("Drop Folder is set with KS validation, KS user ID [" . $this->ksInfo->userId . "] does not match item user ID [" . $item->userId . "]", KalturaBatchJobAppErrors::BULK_ITEM_VALIDATION_FAILED); } } parent::validateItem($item); }