]> git.mxchange.org Git - friendica.git/commitdiff
Fix for magic auth
authorMichael <heluecht@pirati.ca>
Thu, 13 Dec 2018 21:19:57 +0000 (21:19 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 13 Dec 2018 21:19:57 +0000 (21:19 +0000)
src/Model/Profile.php

index a73c8410b31ba12a114b85cf8e31fee9d2c93c8b..da20a6f24aa5e76742da1da312ef944f65b08c2c 100644 (file)
@@ -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