Bug fix: last commit results in logged-in user's contacts being displayed on contact profile sidebar.

This commit is contained in:
very-ape 2021-05-21 11:38:50 -07:00
parent 93926e99b8
commit 97a9ec4e40
1 changed files with 3 additions and 2 deletions

View File

@ -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)) {