<?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
*
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
-use Friendica\Core\Session\Capability\IHandleSessions;
+use Friendica\Core\Session\Capability\IHandleUserSessions;
use Friendica\DI;
use Friendica\Module\Register;
use Friendica\Module\Response;
/** @var IManageConfigValues */
private $config;
- /** @var IHandleSessions */
+ /** @var IHandleUserSessions */
private $session;
- public function __construct(Authentication $auth, IManageConfigValues $config, IHandleSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
+ public function __construct(Authentication $auth, IManageConfigValues $config, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = [])
{
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
{
$return_path = $request['return_path'] ?? $this->session->pop('return_path', '') ;
- if (local_user()) {
+ if ($this->session->getLocalUserId()) {
$this->baseUrl->redirect($return_path);
}
];
}
- if (local_user()) {
+ if (DI::userSession()->getLocalUserId()) {
$tpl = Renderer::getMarkupTemplate('logout.tpl');
} else {
DI::page()['htmlhead'] .= Renderer::replaceMacros(