updated plugin Two Factor version 0.13.0

This commit is contained in:
2025-04-29 21:20:04 +00:00
committed by Gitium
parent c950632407
commit a212704ec2
16 changed files with 547 additions and 231 deletions

View File

@ -164,6 +164,10 @@ class Two_Factor_FIDO_U2F_Admin {
* @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;
@ -230,7 +234,7 @@ class Two_Factor_FIDO_U2F_Admin {
* @static
*
* @param int $user_id User ID.
* @return false
* @return void|never
*/
public static function catch_submission( $user_id ) {
if ( ! empty( $_REQUEST['do_new_security_key'] ) ) {
@ -243,7 +247,7 @@ class Two_Factor_FIDO_U2F_Admin {
Two_Factor_FIDO_U2F::add_security_key( $user_id, $reg );
} catch ( Exception $e ) {
return false;
return;
}
delete_user_meta( $user_id, self::REGISTER_DATA_USER_META_KEY );