]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/PermissionTooltip.php
Retrieve contact records for the page visitor in Profile\Contacts module
[friendica.git] / src / Module / PermissionTooltip.php
index ec449aa15fa2f77d9afeb3859683f615bddfd921..c1ef4c2b4b794a5286cbd9d22ece63f98314d54e 100644 (file)
@@ -49,7 +49,7 @@ class PermissionTooltip extends \Friendica\BaseModule
                        throw new HTTPException\BadRequestException(DI::l10n()->t('Wrong type "%s", expected one of: %s', $type, implode(', ', $expectedTypes)));
                }
 
-               $condition = ['id' => $referenceId, 'uid' => [0, local_user()]];
+               $condition = ['id' => $referenceId, 'uid' => [0, DI::userSession()->getLocalUserId()]];
                if ($type == 'item') {
                        $fields = ['uid', 'psid', 'private', 'uri-id'];
                        $model = Post::selectFirst($fields, $condition);
@@ -177,7 +177,7 @@ class PermissionTooltip extends \Friendica\BaseModule
        private function fetchReceivers(int $uriId): string
        {
                $own_url = '';
-               $uid = local_user();
+               $uid = DI::userSession()->getLocalUserId();
                if ($uid) {
                        $owner = User::getOwnerDataById($uid);
                        if (!empty($owner['url'])) {