]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Item/Follow.php
Merge pull request #12429 from MrPetovan/bug/contactblock-icon
[friendica.git] / src / Module / Item / Follow.php
index 331e5fe760467c93e6c554a8bab3fe5900f2e355..c28e49c8c8f44cb9be02347464d8e5f4975fdbd0 100644 (file)
@@ -22,7 +22,6 @@
 namespace Friendica\Module\Item;
 
 use Friendica\BaseModule;
-use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Model\Item;
@@ -38,7 +37,7 @@ class Follow extends BaseModule
        {
                $l10n = DI::l10n();
 
-               if (!Session::isAuthenticated()) {
+               if (!DI::userSession()->isAuthenticated()) {
                        throw new HttpException\ForbiddenException($l10n->t('Access denied.'));
                }
 
@@ -48,7 +47,7 @@ class Follow extends BaseModule
 
                $itemId = intval($this->parameters['id']);
 
-               if (!Item::performActivity($itemId, 'follow', Session::getLocalUser())) {
+               if (!Item::performActivity($itemId, 'follow', DI::userSession()->getLocalUserId())) {
                        throw new HTTPException\BadRequestException($l10n->t('Unable to follow this item.'));
                }