From 73989bbf33dea991907d5992bcfd949eb94066d6 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 b9d1b7b4..b108e53a 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -925,6 +925,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 ) );