]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseNotifications.php
spelling: parameter
[friendica.git] / src / Module / BaseNotifications.php
index 9e7456c7b5d813950dd24c3c4acc23754ef9d9db..45975672b48494410e39514dfdf1bc7bc114db5e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -28,7 +28,7 @@ use Friendica\BaseModule;
 use Friendica\Content\Pager;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
-use Friendica\Core\Session;
+use Friendica\Core\Session\Capability\IHandleUserSessions;
 use Friendica\Core\System;
 use Friendica\Navigation\Notifications\ValueObject\FormattedNotify;
 use Friendica\Network\HTTPException\ForbiddenException;
@@ -90,11 +90,11 @@ abstract class BaseNotifications extends BaseModule
         */
        abstract public function getNotifications();
 
-       public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
+       public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = [])
        {
                parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
 
-               if (!Session::getLocalUser()) {
+               if (!$session->getLocalUserId()) {
                        throw new ForbiddenException($this->t('Permission denied.'));
                }