X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHCard.php;h=f245d71354089fd5c661f760a5879538f63f2545;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=110371ee9595851d67cbacbaf21ed131e745213f;hpb=3bae52074a644b0ade3808bed9fc1268e1baa4e3;p=friendica.git
diff --git a/src/Module/HCard.php b/src/Module/HCard.php
index 110371ee95..f245d71354 100644
--- a/src/Module/HCard.php
+++ b/src/Module/HCard.php
@@ -1,6 +1,6 @@
parameters['action'] ?? '') === 'view') {
+ if (DI::userSession()->getLocalUserId() && ($this->parameters['action'] ?? '') === 'view') {
// A logged in user views a profile of a user
$nickname = DI::app()->getLoggedInUserNickname();
} elseif (empty($this->parameters['action'])) {
@@ -65,20 +64,20 @@ class HCard extends BaseModule
$page['htmlhead'] .= '' . "\r\n";
}
- $baseUrl = DI::baseUrl();
+ $baseUrl = (string)DI::baseUrl();
- $uri = urlencode('acct:' . $profile['nickname'] . '@' . $baseUrl->getHostname() . ($baseUrl->getUrlPath() ? '/' . $baseUrl->getUrlPath() : ''));
+ $uri = urlencode('acct:' . $profile['nickname'] . '@' . DI::baseUrl()->getHost() . (DI::baseUrl()->getPath() ? '/' . DI::baseUrl()->getPath() : ''));
$page['htmlhead'] .= '' . "\r\n";
- $page['htmlhead'] .= '' . "\r\n";
- $page['htmlhead'] .= '' . "\r\n";
- header('Link: <' . $baseUrl->get() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
+ $page['htmlhead'] .= '' . "\r\n";
+ $page['htmlhead'] .= '' . "\r\n";
+ header('Link: <' . $baseUrl . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
foreach (['request', 'confirm', 'notify', 'poll'] as $dfrn) {
- $page['htmlhead'] .= "get() . "/dfrn_{$dfrn}/{$nickname}\" />\r\n";
+ $page['htmlhead'] .= "\r\n";
}
- $block = (DI::config()->get('system', 'block_public') && !Session::isAuthenticated());
+ $block = (DI::config()->get('system', 'block_public') && !DI::userSession()->isAuthenticated());
// check if blocked
if ($block) {