X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseNotifications.php;h=d0c0ae36276857f7087a05e6f15e274216f0636d;hb=fca1abbafe5656047db9d47bfb6974af60180463;hp=1190e046dfb6ea8742db87fa4a1a4fd258adae1d;hpb=7ce97459d437a98ece0077b28bb36771aa36ed82;p=friendica.git diff --git a/src/Module/BaseNotifications.php b/src/Module/BaseNotifications.php index 1190e046df..d0c0ae3627 100644 --- a/src/Module/BaseNotifications.php +++ b/src/Module/BaseNotifications.php @@ -28,6 +28,7 @@ use Friendica\BaseModule; use Friendica\Content\Pager; use Friendica\Core\L10n; use Friendica\Core\Renderer; +use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\System; use Friendica\Navigation\Notifications\ValueObject\FormattedNotify; use Friendica\Network\HTTPException\ForbiddenException; @@ -89,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 (!local_user()) { + if (!$session->getLocalUserId()) { throw new ForbiddenException($this->t('Permission denied.')); }