]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/TwoFactor/Recovery.php
Merge pull request #8227 from annando/daemon-checks
[friendica.git] / src / Module / Settings / TwoFactor / Recovery.php
index 604eca480274bc14acc8ade6a799afbab40a7aa6..089283d3324d7cd1627479e1521797418a250450 100644 (file)
@@ -2,11 +2,10 @@
 
 namespace Friendica\Module\Settings\TwoFactor;
 
-use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\DI;
 use Friendica\Model\TwoFactor\RecoveryCode;
-use Friendica\Module\BaseSettingsModule;
+use Friendica\Module\BaseSettings;
 use Friendica\Module\Security\Login;
 
 /**
@@ -14,7 +13,7 @@ use Friendica\Module\Security\Login;
  *
  * @package Friendica\Module\TwoFactor
  */
-class Recovery extends BaseSettingsModule
+class Recovery extends BaseSettings
 {
        public static function init(array $parameters = [])
        {
@@ -29,7 +28,7 @@ class Recovery extends BaseSettingsModule
                }
 
                if (!self::checkFormSecurityToken('settings_2fa_password', 't')) {
-                       notice(L10n::t('Please enter your password to access this page.'));
+                       notice(DI::l10n()->t('Please enter your password to access this page.'));
                        DI::baseUrl()->redirect('settings/2fa');
                }
        }
@@ -45,7 +44,7 @@ class Recovery extends BaseSettingsModule
 
                        if ($_POST['action'] == 'regenerate') {
                                RecoveryCode::regenerateForUser(local_user());
-                               notice(L10n::t('New recovery codes successfully generated.'));
+                               notice(DI::l10n()->t('New recovery codes successfully generated.'));
                                DI::baseUrl()->redirect('settings/2fa/recovery?t=' . self::getFormSecurityToken('settings_2fa_password'));
                        }
                }
@@ -71,14 +70,14 @@ class Recovery extends BaseSettingsModule
                        '$form_security_token'     => self::getFormSecurityToken('settings_2fa_recovery'),
                        '$password_security_token' => self::getFormSecurityToken('settings_2fa_password'),
 
-                       '$title'              => L10n::t('Two-factor recovery codes'),
-                       '$help_label'         => L10n::t('Help'),
-                       '$message'            => L10n::t('<p>Recovery codes can be used to access your account in the event you lose access to your device and cannot receive two-factor authentication codes.</p><p><strong>Put these in a safe spot!</strong> If you lose your device and don’t have the recovery codes you will lose access to your account.</p>'),
+                       '$title'              => DI::l10n()->t('Two-factor recovery codes'),
+                       '$help_label'         => DI::l10n()->t('Help'),
+                       '$message'            => DI::l10n()->t('<p>Recovery codes can be used to access your account in the event you lose access to your device and cannot receive two-factor authentication codes.</p><p><strong>Put these in a safe spot!</strong> If you lose your device and don’t have the recovery codes you will lose access to your account.</p>'),
                        '$recovery_codes'     => $recoveryCodes,
-                       '$regenerate_message' => L10n::t('When you generate new recovery codes, you must copy the new codes. Your old codes won’t work anymore.'),
-                       '$regenerate_label'   => L10n::t('Generate new recovery codes'),
+                       '$regenerate_message' => DI::l10n()->t('When you generate new recovery codes, you must copy the new codes. Your old codes won’t work anymore.'),
+                       '$regenerate_label'   => DI::l10n()->t('Generate new recovery codes'),
                        '$verified'           => $verified,
-                       '$verify_label'       => L10n::t('Next: Verification'),
+                       '$verify_label'       => DI::l10n()->t('Next: Verification'),
                ]);
        }
 }