From a2eb0c737877567adcacfd94c06d3af7d042c670 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 18 Oct 2022 21:13:28 +0200 Subject: [PATCH] Move Core\Session::remove() to DI::session()->remove() --- src/Core/Session.php | 5 ----- src/Module/Settings/TwoFactor/Index.php | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Core/Session.php b/src/Core/Session.php index 41ddf97839..c1d2b73901 100644 --- a/src/Core/Session.php +++ b/src/Core/Session.php @@ -34,11 +34,6 @@ class Session public static $exists = false; public static $expire = 180000; - public static function remove($name) - { - DI::session()->remove($name); - } - public static function clear() { DI::session()->clear(); diff --git a/src/Module/Settings/TwoFactor/Index.php b/src/Module/Settings/TwoFactor/Index.php index be3d8d232c..ae4e518faa 100644 --- a/src/Module/Settings/TwoFactor/Index.php +++ b/src/Module/Settings/TwoFactor/Index.php @@ -22,7 +22,6 @@ namespace Friendica\Module\Settings\TwoFactor; use Friendica\Core\Renderer; -use Friendica\Core\Session; use Friendica\DI; use Friendica\Network\HTTPException\FoundException; use Friendica\Security\TwoFactor\Model\AppSpecificPassword; @@ -64,7 +63,7 @@ class Index extends BaseSettings RecoveryCode::deleteForUser(local_user()); DI::pConfig()->delete(local_user(), '2fa', 'secret'); DI::pConfig()->delete(local_user(), '2fa', 'verified'); - Session::remove('2fa'); + DI::session()->remove('2fa'); DI::sysmsg()->addInfo(DI::l10n()->t('Two-factor authentication successfully disabled.')); DI::baseUrl()->redirect('settings/2fa'); -- 2.39.5