diff options
author | Andy Xheli <axheli@axtsolutions.com> | 2022-05-27 14:48:06 -0500 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-05 08:42:07 +0000 |
commit | 511ade949735cfcc762e315e2c25b2c3c28ee8db (patch) | |
tree | 253aa6521235e0364881e65c53baf88367bfeb1e | |
parent | c765dac63354c28f9a85b5ecc9a425ab0aae2ce4 (diff) | |
download | nextcloud-server-511ade949735cfcc762e315e2c25b2c3c28ee8db.tar.gz nextcloud-server-511ade949735cfcc762e315e2c25b2c3c28ee8db.zip |
Fix User profile picture when performing the search
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
-rw-r--r-- | lib/private/Contacts/ContactsMenu/ContactsStore.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index dd4bd973fa9..2c84aa9dc9c 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -284,8 +284,11 @@ class ContactsStore implements IContactsStore { private function contactArrayToEntry(array $contact): Entry { $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'])) { |