diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index 0ac388ce00a3f..697c6dc0e086e 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -123,7 +123,6 @@ public function getContacts(IUser $user, $filter, ?int $limit = null, ?int $offs } return true; }); - $entries = array_map(function (array $contact) { return $this->contactArrayToEntry($contact); }, $contacts); @@ -312,19 +311,17 @@ public function findOne(IUser $user, $shareType, $shareWith) { 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'])) { $entry->setFullName($contact['FN']); } - $avatarPrefix = "VALUE=uri:"; - if (isset($contact['PHOTO']) && strpos($contact['PHOTO'], $avatarPrefix) === 0) { - $entry->setAvatar(substr($contact['PHOTO'], strlen($avatarPrefix))); - } - if (isset($contact['EMAIL'])) { foreach ($contact['EMAIL'] as $email) { $entry->addEMailAddress($email);