Skip to content

Commit

Permalink
Fire an action when a user revalidates their 2FA session. (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
dd32 authored Jul 30, 2024
1 parent 44f058b commit e5d6b20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions class-two-factor-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,8 @@ public static function _login_form_revalidate_2fa( $nonce = '', $provider = '',
'two-factor-login' => time(),
) );

do_action( 'two_factor_user_revalidated', $user, $provider );

// Must be global because that's how login_header() uses it.
global $interim_login;
$interim_login = isset( $_REQUEST['interim-login'] ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited,WordPress.Security.NonceVerification.Recommended
Expand Down

0 comments on commit e5d6b20

Please sign in to comment.