]> git.mxchange.org Git - friendica.git/commitdiff
Move Core\Session::remove() to DI::session()->remove()
authorPhilipp <admin@philipp.info>
Tue, 18 Oct 2022 19:13:28 +0000 (21:13 +0200)
committerPhilipp <admin@philipp.info>
Tue, 18 Oct 2022 19:13:28 +0000 (21:13 +0200)
src/Core/Session.php
src/Module/Settings/TwoFactor/Index.php

index 41ddf97839844d5fd3920c29deb9dad85dcfd479..c1d2b73901886f09b56d18b46113150c6c745dc1 100644 (file)
@@ -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();
index be3d8d232c55ebb7bbf6b6864af2f54ca504b282..ae4e518faa2f3cd16aa5ea3cc46e4aa24307a0b7 100644 (file)
@@ -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');