Skip to content
Snippets Groups Projects
Verified Commit a756711b authored by Damien's avatar Damien
Browse files

FEAT #9685 Autocomplete users primaryEntity

parent dd478df7
No related branches found
No related tags found
No related merge requests found
...@@ -101,12 +101,14 @@ class AutoCompleteController ...@@ -101,12 +101,14 @@ class AutoCompleteController
$data = []; $data = [];
foreach ($users as $value) { foreach ($users as $value) {
$primaryEntity = UserModel::getPrimaryEntityByUserId(['userId' => $value['user_id']]);
$data[] = [ $data[] = [
'type' => 'user', 'type' => 'user',
'id' => $value['user_id'], 'id' => $value['user_id'],
'serialId' => $value['id'], 'serialId' => $value['id'],
'idToDisplay' => "{$value['firstname']} {$value['lastname']}", 'idToDisplay' => "{$value['firstname']} {$value['lastname']}",
'otherInfo' => '' 'descriptionToDisplay' => empty($primaryEntity) ? '' : $primaryEntity['entity_label'],
'otherInfo' => ''
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment