From d00ba1b78aac1305b8e5548d1c2a6382fa2fba88 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Wed, 30 Nov 2022 15:21:22 -0800 Subject: [PATCH] Disable 2FA requirement for beta tests See https://github.com/WordPress/wporg-two-factor/issues/6#issuecomment-1326875334 --- wporg-two-factor.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wporg-two-factor.php b/wporg-two-factor.php index 6ce17d64..bd68540c 100644 --- a/wporg-two-factor.php +++ b/wporg-two-factor.php @@ -95,6 +95,12 @@ function remove_capabilities_until_2fa_enabled( array $allcaps, array $caps, arr function user_requires_2fa( WP_User $user ) : bool { global $trusted_deputies, $wcorg_subroles; + // 2FA is opt-in during beta testing. + // todo Remove this once we open it to all users. + if ( 'production' === wp_get_environment_type() ) { + return false; + } + $required = false; if ( is_special_user( $user->ID ) ) {