New function to store the "remote" session value / making the changes work

This commit is contained in:
Michael 2019-09-26 04:47:42 +00:00
parent ec66553032
commit 704cdf1b5a
5 changed files with 33 additions and 41 deletions

View file

@ -86,8 +86,8 @@ class Profile extends BaseModule
$a->page['htmlhead'] .= "\n";
$blocked = !local_user() && !remote_user() && Config::get('system', 'block_public');
$userblock = !local_user() && !remote_user() && $a->profile['hidewall'];
$blocked = !local_user() && !remote_user($a->profile['profile_uid']) && Config::get('system', 'block_public');
$userblock = !local_user() && !remote_user($a->profile['profile_uid']) && $a->profile['hidewall'];
if (!empty($a->profile['page-flags']) && $a->profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY) {
$a->page['htmlhead'] .= '<meta name="friendica.community" content="true" />' . "\n";
@ -153,7 +153,7 @@ class Profile extends BaseModule
$hashtags = defaults($_GET, 'tag', '');
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
if (Config::get('system', 'block_public') && !local_user() && !remote_user($a->profile['profile_uid'])) {
return Login::form();
}
@ -169,12 +169,12 @@ class Profile extends BaseModule
Nav::setSelected('home');
}
$remote_contact = ContactModel::isFollower(remote_user(), $a->profile['profile_uid']);
$remote_contact = remote_user($a->profile['profile_uid']);
$is_owner = local_user() == $a->profile['profile_uid'];
$last_updated_key = "profile:" . $a->profile['profile_uid'] . ":" . local_user() . ":" . remote_user();
$last_updated_key = "profile:" . $a->profile['profile_uid'] . ":" . local_user() . ":" . $remote_contact;
if ($remote_contact) {
$cdata = ContactModel::getPublicAndUserContacID(remote_user(), $a->profile['profile_uid']);
$cdata = ContactModel::getPublicAndUserContacID($remote_contact, $a->profile['profile_uid']);
if (!empty($cdata['user'])) {
$groups = Group::getIdsByContactId($cdata['user']);
$remote_cid = $cdata['user'];