Empty the "remote" variable, avoid being remote to yourself

This commit is contained in:
Michael 2019-09-25 07:02:07 +00:00
parent 1a1745c9fa
commit d5c37001cd
2 changed files with 3 additions and 2 deletions

View file

@ -1124,7 +1124,7 @@ class Profile
/// @todo replace this and the query for this variable with some cleaner functionality
$_SESSION['remote'] = [];
$remote_contacts = DBA::select('contact', ['id', 'uid'], ['nurl' => $visitor['nurl'], 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]);
$remote_contacts = DBA::select('contact', ['id', 'uid'], ['nurl' => $visitor['nurl'], 'rel' => [Contact::FOLLOWER, Contact::FRIEND], 'self' => false]);
while ($contact = DBA::fetch($remote_contacts)) {
if (($contact['uid'] == 0) || Contact::isBlockedByUser($visitor['id'], $contact['uid'])) {
continue;