]> git.mxchange.org Git - friendica.git/commitdiff
Bug fix: last commit results in logged-in user's contacts being displayed on contact...
authorvery-ape <git@verya.pe>
Fri, 21 May 2021 18:38:50 +0000 (11:38 -0700)
committervery-ape <git@verya.pe>
Fri, 21 May 2021 18:38:50 +0000 (11:38 -0700)
src/Model/Profile.php

index 74549299439304f511ae7ba90f3d65fae5833162..1476d67a51c6d152dfd42975761fc69683b33049 100644 (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)) {