- else {
- if($community_page && remote_user()) {
- if(is_array($_SESSION['remote'])) {
- foreach($_SESSION['remote'] as $v) {
- if($v['uid'] == $owner_uid) {
- $contact_id = $v['cid'];
- break;
- }
+ } elseif ($community_page && remote_user()) {
+ if (!empty($_SESSION['remote'])) {
+ foreach ($_SESSION['remote'] as $v) {
+ if ($v['uid'] == $owner_uid) {
+ $contact_id = $v['cid'];
+ break;