Skip to content

Commit

Permalink
Don’t show the settings if the method is not supported for the user
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Feb 14, 2025
1 parent 58e30e0 commit 966285f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/class-two-factor-fido-u2f-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 966285f

Please sign in to comment.