X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FSecurity%2FTwoFactor%2FVerify.php;h=16f146d6dea4cf7d9bdce13807e68bf99b77f15c;hb=759d9d9f1a68f13bd66594de6f24cb6938cfe599;hp=bb3e444a930380c28c5a8c1e32b926bfc8305314;hpb=28090bd79376f3a7c0708eeb4e36a25fd782c240;p=friendica.git diff --git a/src/Module/Security/TwoFactor/Verify.php b/src/Module/Security/TwoFactor/Verify.php index bb3e444a93..16f146d6de 100644 --- a/src/Module/Security/TwoFactor/Verify.php +++ b/src/Module/Security/TwoFactor/Verify.php @@ -1,6 +1,6 @@ setForUser($a, User::getById($a->getUserId()), true, true); + DI::auth()->setForUser($a, User::getById($a->getLoggedInUserId()), true, true); } else { self::$errors[] = DI::l10n()->t('Invalid code, please retry.'); } } } - public static function content(array $parameters = []) + protected function content(array $request = []): string { if (!local_user()) { DI::baseUrl()->redirect(); @@ -96,8 +96,8 @@ class Verify extends BaseModule '$message' => DI::l10n()->t('

Open the two-factor authentication app on your device to get an authentication code and verify your identity.

'), '$errors_label' => DI::l10n()->tt('Error', 'Errors', count(self::$errors)), '$errors' => self::$errors, - '$recovery_message' => DI::l10n()->t('Don’t have your phone? Enter a two-factor recovery code', '2fa/recovery'), - '$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', DI::l10n()->t('Required'), 'autofocus autocomplete="off" placeholder="000000"', 'tel'], + '$recovery_message' => DI::l10n()->t('If you do not have access to your authentication code you can use a two-factor recovery code.', '2fa/recovery'), + '$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', DI::l10n()->t('Required'), 'autofocus autocomplete="one-time-code" placeholder="000000" inputmode="numeric" pattern="[0-9]*"', 'tel'], '$trust_browser' => ['trust_browser', DI::l10n()->t('This is my two-factor authenticator app device'), !empty($_REQUEST['trust_browser'])], '$verify_label' => DI::l10n()->t('Verify code and complete login'), ]);