From 1f486c51ca8d95722bfcda598decfb9e8279203f Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 17 Jul 2021 17:06:47 +0300 Subject: [PATCH] add workaround for bbpress frontend profile edit screen crash --- class-two-factor-core.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index d9a85af7..fb688f25 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -932,6 +932,11 @@ public static function manage_users_custom_column( $output, $column_name, $user_ * @param WP_User $user WP_User object of the logged-in user. */ public static function user_two_factor_options( $user ) { + + /* workaround for two factor options crashing bbpress' profile page */ + if ( function_exists('bbp_is_user_home_edit') && bbp_is_user_home_edit() ) return; + /* end workaround */ + 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 ) );