This commit is contained in:
Pinga 2023-12-27 12:45:46 +02:00
parent 359441fa33
commit 9f3fbd5630

View file

@ -1538,15 +1538,26 @@ class DomainsController extends Controller
// Check if $contact_id is not null before update // Check if $contact_id is not null before update
if ($contact_id !== null) { if ($contact_id !== null) {
$db->update( if ($contact_map_id !== null) {
'domain_contact_map', $db->update(
[ 'domain_contact_map',
'contact_id' => $contact_id, [
], 'contact_id' => $contact_id,
[ ],
'id' => $contact_map_id['id'] [
] 'id' => $contact_map_id['id']
); ]
);
} else {
$db->insert(
'domain_contact_map',
[
'contact_id' => $contact_id,
'domain_id' => $domain_id,
'type' => $type
]
);
}
} }
} }
} }