Skip to content
Snippets Groups Projects
Commit 41f8e0cd authored by kevin.dezaphi's avatar kevin.dezaphi
Browse files

FIX #8426 remove useless query

parent 1281c97b
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ class EntityController
if ($listTemplate['object_type'] == 'entity_id' && !empty($listTemplate['item_id'])) {
$entity['listTemplate']['id'] = $listTemplate['id'];
if ($listTemplate['item_type'] == 'user_id') {
$statusUser = UserModel::getByUserId(['select' => ['status'], 'userId' => $listTemplate['item_id']]);
$statusUser = UserModel::getByUserId(['select' => ['status', 'firstname', 'lastname'], 'userId' => $listTemplate['item_id']]);
if ($statusUser['status'] != 'DEL') {
$entity['listTemplate'][$listTemplate['item_mode']][] = [
'item_type' => $listTemplate['item_type'],
......@@ -106,7 +106,7 @@ class EntityController
'sequence' => $listTemplate['sequence'],
'title' => $listTemplate['title'],
'description' => $listTemplate['description'],
'labelToDisplay' => UserModel::getLabelledUserById(['userId' => $listTemplate['item_id']]),
'labelToDisplay' => $statusUser['firstname']. ' ' .$statusUser['lastname'],
'descriptionToDisplay' => UserModel::getPrimaryEntityByUserId(['userId' => $listTemplate['item_id']])['entity_label']
];
}
......
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