From 97a9ec4e401155f0041326bd471566e4fe12e5fb Mon Sep 17 00:00:00 2001 From: very-ape Date: Fri, 21 May 2021 11:38:50 -0700 Subject: [PATCH] Bug fix: last commit results in logged-in user's contacts being displayed on contact profile sidebar. --- src/Model/Profile.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 7454929943..1476d67a51 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -169,12 +169,13 @@ class Profile if (empty($user['uid'])) { $profile = []; } else { + $contact_id = Contact::getIdForURL(Strings::normaliseLink(DI::baseurl() . '/profile/' . $nickname), local_user()); $profile = array_merge( $user, + Contact::getById($contact_id), Profile::getByUID($user['uid']), - Contact::getById(Contact::getIdForURL(Strings::normaliseLink(DI::baseurl() . '/profile/' . $nickname), local_user())) ); - $profile['cid'] = $profile['id']; + $profile['cid'] = $contact_id; } if (empty($profile) && empty($profiledata)) {