$value) { unset($event['Event']['Attribute'][$key]['value1']); unset($event['Event']['Attribute'][$key]['value2']); unset($event['Event']['Attribute'][$key]['category_order']); } if (isset($event['Event']['RelatedEvent'])) { foreach ($event['Event']['RelatedEvent'] as $key => $value) { unset($event['Event']['RelatedEvent'][$key]['user_id']); if ('true' != Configure::read('MISP.showorg') && !$isAdmin) { unset($event['Event']['RelatedEvent'][$key]['org']); unset($event['Event']['RelatedEvent'][$key]['orgc']); } } } // display the XML to the user $xmlArray['response']['Event'][] = $event['Event']; $xmlArray['response']['xml_version'] = $mispVersion; $xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags')); echo $xmlObject->asXML();