v1.5.0
This commit is contained in:
parent
467560d420
commit
054060374e
1 changed files with 4058 additions and 73 deletions
|
|
@ -1043,7 +1043,20 @@ class Login_Form_Manager {
|
|||
$frequency = $this->get_effective_frequency( $user, $user_settings );
|
||||
|
||||
if ( $this->has_recent_verification( $user, $methods, $frequency ) ) {
|
||||
return '';
|
||||
/**
|
||||
* Filter whether to force a fresh 2FA challenge regardless of the frequency setting.
|
||||
*
|
||||
* Return true to always challenge the user, overriding the frequency-based skip.
|
||||
* Used by GeoIP restrictions to mandate verification from new countries.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param bool $force Whether to force the challenge. Default false.
|
||||
* @param \WP_User $user User about to be challenged.
|
||||
*/
|
||||
if ( ! (bool) apply_filters( 'robotstxt_2fa_force_challenge', false, $user ) ) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->select_preferred_method( $methods );
|
||||
|
|
|
|||
Loading…
Reference in a new issue