mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 13:47:17 +02:00
Extend IHandleUserSessions
from IHandleSessions
and adapt classes
This commit is contained in:
parent
b72d727a06
commit
b5bc1b0844
14 changed files with 165 additions and 138 deletions
|
@ -26,7 +26,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Cache\Capability\ICanCache;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Session\Capability\IHandleSessions;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -44,10 +44,11 @@ class Logout extends BaseModule
|
|||
protected $cache;
|
||||
/** @var Cookie */
|
||||
protected $cookie;
|
||||
/** @var IHandleSessions */
|
||||
/** @var IHandleUserSessions
|
||||
*/
|
||||
protected $session;
|
||||
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, ICanCache $cache, Cookie $cookie, IHandleSessions $session, array $server, array $parameters = [])
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, ICanCache $cache, Cookie $cookie, IHandleUserSessions $session, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
|
@ -63,7 +64,7 @@ class Logout extends BaseModule
|
|||
protected function rawContent(array $request = [])
|
||||
{
|
||||
$visitor_home = null;
|
||||
if (DI::userSession()->getRemoteUserId()) {
|
||||
if ($this->session->getRemoteUserId()) {
|
||||
$visitor_home = Profile::getMyURL();
|
||||
$this->cache->delete('zrlInit:' . $visitor_home);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue