Skip to content

Commit

Permalink
Disable 2FA requirement for beta tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed Nov 30, 2022
1 parent 31aabc6 commit d00ba1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wporg-two-factor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit d00ba1b

Please sign in to comment.