X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FTwoFactor%2FRecovery.php;h=60f443c35ffe88bc54cf0658c52625c8b394f40d;hb=3940e804e3ee4ac921e109f62a73fac2becaa611;hp=cd197e030fd6fa76b46246e850a465bb85611edd;hpb=d7e9b91181733ec8f84231fb9e05a890e8f60291;p=friendica.git diff --git a/src/Module/TwoFactor/Recovery.php b/src/Module/TwoFactor/Recovery.php index cd197e030f..60f443c35f 100644 --- a/src/Module/TwoFactor/Recovery.php +++ b/src/Module/TwoFactor/Recovery.php @@ -6,7 +6,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session; -use Friendica\Model\TwoFactorRecoveryCode; +use Friendica\Model\TwoFactor\RecoveryCode; /** * // Page 1a: Recovery code verification @@ -35,10 +35,10 @@ class Recovery extends BaseModule $recovery_code = defaults($_POST, 'recovery_code', ''); - if (TwoFactorRecoveryCode::existsForUser(local_user(), $recovery_code)) { - TwoFactorRecoveryCode::markUsedForUser(local_user(), $recovery_code); + if (RecoveryCode::existsForUser(local_user(), $recovery_code)) { + RecoveryCode::markUsedForUser(local_user(), $recovery_code); Session::set('2fa', true); - notice(L10n::t('Remaining recovery codes: %d', TwoFactorRecoveryCode::countValidForUser(local_user()))); + notice(L10n::t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user()))); // Resume normal login workflow Session::setAuthenticatedForUser($a, $a->user, true, true); @@ -61,11 +61,12 @@ class Recovery extends BaseModule return Renderer::replaceMacros(Renderer::getMarkupTemplate('twofactor/recovery.tpl'), [ '$form_security_token' => self::getFormSecurityToken('twofactor_recovery'), - '$title' => L10n::t('Two-factor recovery'), - '$message' => L10n::t('

You can enter one of your one-time recovery codes in case you lost access to your mobile device.

'), + + '$title' => L10n::t('Two-factor recovery'), + '$message' => L10n::t('

You can enter one of your one-time recovery codes in case you lost access to your mobile device.

'), '$recovery_message' => L10n::t('Don’t have your phone? Enter a two-factor recovery code', '2fa/recovery'), - '$recovery_code' => ['recovery_code', L10n::t('Please enter a recovery code'), '', '', '', 'placeholder="000000-000000"'], - '$recovery_label' => L10n::t('Submit recovery code and complete login'), + '$recovery_code' => ['recovery_code', L10n::t('Please enter a recovery code'), '', '', '', 'placeholder="000000-000000"'], + '$recovery_label' => L10n::t('Submit recovery code and complete login'), ]); } }