Further work on identica epp extension

This commit is contained in:
Pinga 2023-08-22 13:03:51 +03:00
parent 30e353658e
commit 6bb091b0f1

View file

@ -304,11 +304,11 @@ function processContactCreate($conn, $db, $xml, $clid, $database_type) {
}
}
$obj_ext = $xml->xpath('//identExt:create')[0] ?? null;
$obj_ext = $xml->xpath('//identica:create')[0] ?? null;
if ($obj_ext) {
$nin = (string)$obj_ext->xpath('identExt:nin')[0] ?? '';
$nin_type = (string)$obj_ext->xpath('identExt:nin/@type')[0] ?? '';
$nin = (string)$obj_ext->xpath('identica:nin')[0] ?? '';
$nin_type = (string)$obj_ext->xpath('identica:nin/@type')[0] ?? '';
if (!preg_match('/\d/', $nin)) {
sendEppError($conn, 2005, 'NIN should contain one or more numbers');