diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 857ddb34..80df4e25 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -1841,12 +1841,11 @@ public static function user_two_factor_options( $user ) { wp_enqueue_style( 'user-edit-2fa', plugins_url( 'user-edit.css', __FILE__ ), array(), TWO_FACTOR_VERSION ); $enabled_providers = array_keys( self::get_available_providers_for_user( $user ) ); - $primary_provider_key = self::get_primary_provider_key_selected_for_user( $user ); // This is specific to the current session, not the displayed user. $show_2fa_options = self::current_user_can_update_two_factor_options(); - if ( ! $show_2fa_options ) { + if ( $providers && ! $show_2fa_options ) { $url = add_query_arg( 'redirect_to', urlencode( self::get_user_settings_page_url( $user->ID ) . '#two-factor-options' ), @@ -1860,12 +1859,12 @@ public static function user_two_factor_options( $user ) { ); } - printf( - '