Skip to content

Commit 525ba38

Browse files
committed
Fix Issue in Person Update section.
1 parent 9b31821 commit 525ba38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/Webkul/Admin/src/Http/Controllers/Contact/Persons/PersonController.php

+12
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,18 @@ private function sanitizeRequestedPersonData(array $data): array
187187
$data['organization_id'] = null;
188188
}
189189

190+
$data['unique_id'] = '';
191+
192+
if (! empty($data['user_id'])) {
193+
$data['unique_id'] .= '|'.$data['user_id'];
194+
}
195+
196+
if (! empty($data['organization_id'])) {
197+
$data['unique_id'] .= '|'.$data['organization_id'];
198+
}
199+
200+
$data['unique_id'] .= '|'.$data['emails'][0]['value'];
201+
190202
if (isset($data['contact_numbers'])) {
191203
$data['contact_numbers'] = collect($data['contact_numbers'])->filter(fn ($number) => ! is_null($number['value']))->toArray();
192204
}

0 commit comments

Comments
 (0)