]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Settings/TwoFactor/Index.php
Merge pull request #9963 from mexon/mat/support-cid-scheme
[friendica.git] / src / Module / Settings / TwoFactor / Index.php
index 60cfb516e1e1ebf34040afb6600ac914a6c9adb6..81b4639c7823c8a4987ba344d66fdde2a1a5f662 100644 (file)
@@ -24,8 +24,8 @@ namespace Friendica\Module\Settings\TwoFactor;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
 use Friendica\DI;
-use Friendica\Model\TwoFactor\AppSpecificPassword;
-use Friendica\Model\TwoFactor\RecoveryCode;
+use Friendica\Security\TwoFactor\Model\AppSpecificPassword;
+use Friendica\Security\TwoFactor\Model\RecoveryCode;
 use Friendica\Model\User;
 use Friendica\Module\BaseSettings;
 use Friendica\Module\Security\Login;
@@ -64,7 +64,7 @@ class Index extends BaseSettings
                                                DI::pConfig()->delete(local_user(), '2fa', 'verified');
                                                Session::remove('2fa');
 
-                                               notice(DI::l10n()->t('Two-factor authentication successfully disabled.'));
+                                               info(DI::l10n()->t('Two-factor authentication successfully disabled.'));
                                                DI::baseUrl()->redirect('settings/2fa');
                                        }
                                        break;
@@ -78,6 +78,11 @@ class Index extends BaseSettings
                                                DI::baseUrl()->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password'));
                                        }
                                        break;
+                               case 'trusted':
+                                       if ($has_secret) {
+                                               DI::baseUrl()->redirect('settings/2fa/trusted?t=' . self::getFormSecurityToken('settings_2fa_password'));
+                                       }
+                                       break;
                                case 'configure':
                                        if (!$verified) {
                                                DI::baseUrl()->redirect('settings/2fa/verify?t=' . self::getFormSecurityToken('settings_2fa_password'));
@@ -125,11 +130,12 @@ class Index extends BaseSettings
                        '$app_specific_passwords_message'   => DI::l10n()->t('<p>These randomly generated passwords allow you to authenticate on apps not supporting two-factor authentication.</p>'),
 
                        '$action_title'         => DI::l10n()->t('Actions'),
-                       '$password'             => ['password', DI::l10n()->t('Current password:'), '', DI::l10n()->t('You need to provide your current password to change two-factor authentication settings.'), 'required', 'autofocus'],
+                       '$password'             => ['password', DI::l10n()->t('Current password:'), '', DI::l10n()->t('You need to provide your current password to change two-factor authentication settings.'), DI::l10n()->t('Required'), 'autofocus'],
                        '$enable_label'         => DI::l10n()->t('Enable two-factor authentication'),
                        '$disable_label'        => DI::l10n()->t('Disable two-factor authentication'),
                        '$recovery_codes_label' => DI::l10n()->t('Show recovery codes'),
                        '$app_specific_passwords_label' => DI::l10n()->t('Manage app-specific passwords'),
+                       '$trusted_browsers_label' => DI::l10n()->t('Manage trusted browsers'),
                        '$configure_label'      => DI::l10n()->t('Finish app configuration'),
                ]);
        }