]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix User profile picture when performing the search
authorAndy Xheli <axheli@axtsolutions.com>
Fri, 27 May 2022 19:48:06 +0000 (14:48 -0500)
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>
Thu, 27 Oct 2022 10:04:06 +0000 (10:04 +0000)
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
Before
![image](https://user-images.githubusercontent.com/59488153/140980158-b9108161-57ab-48b4-ae6f-98ec4e72775a.png)

After

Fix for #31065

lib/private/Contacts/ContactsMenu/ContactsStore.php

index 0ac388ce00a3fb24f4b52fb6c29f8d5f2fe62474..9f04a20a344bef45a1ec71b572accb7ee6d67a25 100644 (file)
@@ -312,8 +312,11 @@ class ContactsStore implements IContactsStore {
        private function contactArrayToEntry(array $contact) {
                $entry = new Entry();
 
-               if (isset($contact['id'])) {
-                       $entry->setId($contact['id']);
+               if (isset($contact['UID'])) {
+                       $entry->setId($contact['UID']);
+                       $uid = $contact['UID'];
+                       $avatar = "/index.php/avatar/$uid/64";
+                       $entry->setAvatar($avatar);
                }
 
                if (isset($contact['FN'])) {