From 966285fbc3dd61ae80f8ad28a4bdcaf48190af1f Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Fri, 14 Feb 2025 16:59:38 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20show=20the=20settings=20if=20th?= =?UTF-8?q?e=20method=20is=20not=20supported=20for=20the=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/class-two-factor-fido-u2f-admin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/class-two-factor-fido-u2f-admin.php b/providers/class-two-factor-fido-u2f-admin.php index d5412089..1869ab8b 100644 --- a/providers/class-two-factor-fido-u2f-admin.php +++ b/providers/class-two-factor-fido-u2f-admin.php @@ -164,6 +164,10 @@ protected static function asset_version() { * @param WP_User $user WP_User object of the logged-in user. */ public static function show_user_profile( $user ) { + if ( ! Two_Factor_FIDO_U2F::is_supported_for_user( $user ) ) { + return; + } + wp_nonce_field( "user_security_keys-{$user->ID}", '_nonce_user_security_keys' ); $new_key = false;