X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=64df4cc6a9d7fc36a952a107f2845ccfaa21bf7c;hb=d0775be2e28db6a0418e0065f501f1665a05724c;hp=afa61ef026022256304d3e846b2bb9f7b25ea594;hpb=9ecb9842858541db669e6ee61627e8526bf4c719;p=friendica.git diff --git a/mod/display.php b/mod/display.php index afa61ef026..64df4cc6a9 100644 --- a/mod/display.php +++ b/mod/display.php @@ -35,8 +35,18 @@ function display_content(&$a) { $contact = null; $remote_contact = false; - if(remote_user()) { - $contact_id = $_SESSION['visitor_id']; + $contact_id = 0; + + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $a->profile['uid']) { + $contact_id = $v['cid']; + break; + } + } + } + + if($contact_id) { $groups = init_groups_visitor($contact_id); $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id),