updated plugin Two Factor version 0.8.2

This commit is contained in:
2023-10-22 22:21:19 +00:00
committed by Gitium
parent 880d6051ac
commit 2f6b5b6047
5 changed files with 27 additions and 11 deletions

View File

@ -75,7 +75,7 @@ class Two_Factor_Backup_Codes extends Two_Factor_Provider {
'args' => array(
'user_id' => array(
'required' => true,
'type' => 'number',
'type' => 'integer',
),
'enable_provider' => array(
'required' => false,
@ -159,6 +159,9 @@ class Two_Factor_Backup_Codes extends Two_Factor_Provider {
* @param WP_User $user WP_User object of the logged-in user.
*/
public function user_options( $user ) {
wp_enqueue_script( 'wp-api-request' );
wp_enqueue_script( 'jquery' );
$count = self::codes_remaining_for_user( $user );
?>
<p id="two-factor-backup-codes">

View File

@ -83,7 +83,7 @@ class Two_Factor_Totp extends Two_Factor_Provider {
'args' => array(
'user_id' => array(
'required' => true,
'type' => 'number',
'type' => 'integer',
),
),
),
@ -96,7 +96,7 @@ class Two_Factor_Totp extends Two_Factor_Provider {
'args' => array(
'user_id' => array(
'required' => true,
'type' => 'number',
'type' => 'integer',
),
'key' => array(
'type' => 'string',
@ -227,7 +227,7 @@ class Two_Factor_Totp extends Two_Factor_Provider {
/**
* Filter the Label for the TOTP.
*
*
* Must follow the TOTP format for a "label". Do not URL Encode.
*
* @see https://github.com/google/google-authenticator/wiki/Key-Uri-Format#label
@ -276,6 +276,8 @@ class Two_Factor_Totp extends Two_Factor_Provider {
$key = $this->get_user_totp_key( $user->ID );
wp_enqueue_script( 'two-factor-qr-code-generator' );
wp_enqueue_script( 'wp-api-request' );
wp_enqueue_script( 'jquery' );
?>
<div id="two-factor-totp-options">