$entries = [];
foreach ($friends as $friend) {
//get further details of the contact
- $contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid, false));
+ $contactDetails = Model\Contact::getByURLForUser($friend['url'], $uid) ?: $friend;
$connlnk = '';
// $friend[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photoMenu