Skip to content

Commit

Permalink
Reset login attempts count
Browse files Browse the repository at this point in the history
Remove login attempts count when user sets a secret key (see issue #2)
  • Loading branch information
julien731 committed Jul 11, 2014
1 parent 0b17f35 commit 406edd7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions admin/admin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,15 @@ public function SaveCustomProfileFields( $user_id ) {

update_user_meta( $user_id, 'wpga_secret', $_POST['wpga_secret'] );

/**
* Delete the user login attempts without using 2FA.
* This avoids an incorrect number of allowed attempts
* in case the user deactivates the 2FA for his account.
*
* @since 1.0.8
*/
delete_user_meta( $user_id, 'wpga_attempts' );

/* Check if backup key exist */
$backup = get_user_meta( $user_id, 'wpga_backup_key', true );

Expand Down

0 comments on commit 406edd7

Please sign in to comment.