Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Marco Pelloni

    (@marcopelloni)

    The plugin has a filter hook where you can force email on all accounts, add this to your functions.php file:

    // Force email as the only two-factor provider for all users
    add_filter( 'two_factor_enabled_providers_for_user', function( $enabled_providers, $user_id ) {
    return array( 'Two_Factor_Email' );
    }, 10, 2 );
    Thread Starter Marco Pelloni

    (@marcopelloni)

    Hey JC,

    It wouldn’t have to do with another plugin or theme. You’re using ksort on line 71 of functions.php. ksort only takes an array, and on occasion the assoc array was passing through null.

    Since this plugin doesn’t update often, we just made an adjustment to the file to check if the array key exists. If you update your plugin with the following, your users won’t get the fatal error:

    if (array_key_exists($country_request, $newcountry)) {
      ksort($newcountry[$country_request]);
    }
Viewing 2 replies - 1 through 2 (of 2 total)