From 705211100b9d0d5b6dc01790f0eae2dd55c1dddc Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 13 Dec 2018 21:19:57 +0000 Subject: [PATCH] Fix for magic auth --- src/Model/Profile.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index a73c8410b3..da20a6f24a 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -1117,7 +1117,16 @@ class Profile $_SESSION['visitor_handle'] = $visitor['addr']; $_SESSION['visitor_home'] = $visitor['url']; $_SESSION['my_url'] = $visitor['url']; + $_SESSION['remote'] = []; + $remote_contacts = DBA::select('contact', ['id', 'uid'], ['nurl' => $visitor['nurl'], 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]); + while ($contact = DBA::fetch($remote_contacts)) { + if (($contact['uid'] == 0) || Contact::isBlockedByUser($visitor['id'], $contact['uid'])) { + continue; + } + + $_SESSION['remote'][] = ['cid' => $contact['id'], 'uid' => $contact['uid'], 'url' => $visitor['url']]; + } $arr = [ 'visitor' => $visitor, 'url' => $a->query_string -- 2.39.5