You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* If the user had enabled providers, but none of them exist currently,
565
565
* if emailed codes is available force it to be on, so that deprecated
566
566
* or removed providers don't result in the two-factor requirement being
567
567
* removed and 'failing open'.
568
-
*
568
+
*
569
569
* Possible enhancement: add a filter to change the fallback method?
570
570
*/
571
571
if ( empty( $enabled_providers ) && $user_providers_raw ) {
572
572
if ( isset( $providers['Two_Factor_Email'] ) ) {
573
573
// Force Emailed codes to 'on'.
574
574
$enabled_providers[] = 'Two_Factor_Email';
575
575
} else {
576
-
returnnewWP_Error(
577
-
'no_available_2fa_methods',
578
-
__( 'Error: You have Two Factor method(s) enabled, but the provider(s) no longer exist. Please contact a site administrator for assistance.', 'two-factor' ),
// The user has a provider configured according to usermeta, but none are currently available.
963
+
$error = newWP_Error(
964
+
'no_available_2fa_methods',
965
+
__( 'Error: You have Two Factor method(s) enabled, but the provider(s) no longer exist. Please contact a site administrator for assistance.', 'two-factor' ),
0 commit comments