diff --git a/application/ConstructionConsent/ConstructionConsentController.php b/application/ConstructionConsent/ConstructionConsentController.php index 0f1ae7b93..48effd9dd 100644 --- a/application/ConstructionConsent/ConstructionConsentController.php +++ b/application/ConstructionConsent/ConstructionConsentController.php @@ -1117,6 +1117,7 @@ class ConstructionConsentController extends mfBaseController { $country = $addressParts[2] ?? null; } + $ownerRecord->firstname = $ownerData["VN"] ?? null; $ownerRecord->lastname = (($ownerData["JUR"] ?? 'nein') === "ja") ? ($ownerData['BEZ'] ?? $ownerData["NN"]) : ($ownerData["NN"] ?? null); $ownerRecord->birthdate = $birthdate; @@ -1126,7 +1127,9 @@ class ConstructionConsentController extends mfBaseController { $ownerRecord->country = $country; $ownerRecord->edit_by = $this->me->id; - if (empty($ownerRecord->firstname) && empty($ownerRecord->lastname)) { + $firstname = $ownerRecord->firstname; + $lastname = $ownerRecord->lastname; + if (empty($firstname) && empty($lastname)) { $counts["skippedBecauseFirstnameAndLastname"]++; $counts["skipped"]++; continue;