Only assign a uid to the profile if not defined by now
authorMichael <heluecht@pirati.ca>
Thu, 27 Dec 2018 09:58:21 +0000 (09:58 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 27 Dec 2018 09:58:21 +0000 (09:58 +0000)
mod/display.php

index 2a4d2ab..cca4468 100644 (file)
@@ -291,8 +291,8 @@ function display_content(App $a, $update = false, $update_uid = 0)
 
        $parent = Item::selectFirst(['uid'], ['uri' => $item_parent_uri, 'wall' => true]);
        if (DBA::isResult($parent)) {
-               $a->profile['uid'] = $parent['uid'];
-               $a->profile['profile_uid'] = $parent['uid'];
+               $a->profile['uid'] = defaults($a->profile, 'uid', $parent['uid']);
+               $a->profile['profile_uid'] = defaults($a->profile, 'profile_uid', $parent['uid']);
                $is_remote_contact = Contact::isFollower(remote_user(), $a->profile['profile_uid']);
        }