Merge pull request #12058 from Quix0r/fixes/get-remote-userid

Fixed: Undefined property: Friendica\Core\Session\Model\UserSession::$getRemoteUserId
This commit is contained in:
Philipp 2022-10-24 19:40:02 +02:00 committed by GitHub
commit 05b15f2824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -69,10 +69,10 @@ function display_init(App $a)
}
// Is this item private but could be visible to the remove visitor?
if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId) {
if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId()) {
$item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]);
if (DBA::isResult($item)) {
if (!Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) {
if (!Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) {
$item = null;
} else {
$item_user = $item['uid'];
@ -189,9 +189,9 @@ function display_content(App $a, $update = false, $update_uid = 0)
}
}
if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId) {
if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId()) {
$item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]);
if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) {
if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) {
$uri_id = $item['uri-id'];
$parent_uri_id = $item['parent-uri-id'];
}

View File

@ -82,7 +82,7 @@ function redir_init(App $a) {
}
}
if (DI::userSession()->getRemoteUserId) {
if (DI::userSession()->getRemoteUserId()) {
$host = substr(DI::baseUrl()->getUrlPath() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''), strpos(DI::baseUrl()->getUrlPath(), '://') + 3);
$remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);