From 2d2b16a2f62cc71192d7d033ab18a484d0f32da0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 1 Oct 2021 18:27:19 +0200 Subject: [PATCH] if no separate name-components given, simply split first word off as n_given and rest as n_family --- api/src/Contacts/JsContact.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Contacts/JsContact.php b/api/src/Contacts/JsContact.php index bb3b7338a2..f750835946 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -123,6 +123,11 @@ class JsContact case 'fullName': $contact['n_fn'] = self::parseString($value); + // if no separate name-components given, simply split first word off as n_given and rest as n_family + if (!isset($data['name'])) + { + list($contact['n_given'], $contact['n_family']) = explode(' ', $contact['n_fn'], 2); + } break; case 'organizations':