Commit d05c6716 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #18428 TIME 0:20 fix communication means format in autocomplete contacts for m2m

parent cf89362b
......@@ -1505,6 +1505,7 @@ class ContactController
if (!empty($contactRaw['communication_means'])) {
$communicationMeans = json_decode($contactRaw['communication_means'], true);
unset($communicationMeans['password']);
$contact['communicationMeans'] = !empty($communicationMeans) ? $communicationMeans : null;
}
......
......@@ -838,8 +838,9 @@ class AutoCompleteController
$externalId = json_decode($contact['external_id'], true);
$communicationMeans = json_decode($contact['communication_means'], true);
unset($communicationMeans['password']);
$autoContact['m2m'] = $externalId['m2m'];
$autoContact['communicationMeans'] = $communicationMeans['url'] ?? $communicationMeans['email'];
$autoContact['communicationMeans'] = $communicationMeans ?? null;
$autocompleteData[] = $autoContact;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment