]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
modified: view/theme/smoothly/theme.php
[friendica.git] / mod / profile.php
index 24cadef3b26ae8e6683293a43ce2c60ade8d676f..b33b181de1b1b7332611799ac225d366c12fd48a 100644 (file)
@@ -116,8 +116,18 @@ function profile_content(&$a, $update = 0) {
        $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['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),
@@ -294,7 +304,7 @@ function profile_content(&$a, $update = 0) {
                $items = array();
        }
 
-       if($is_owner && ! $update) {
+       if($is_owner && (! $update) && (! get_config('theme','hide_eventlist'))) {
                $o .= get_birthdays();
                $o .= get_events();
        }