• Have just started using this plugin for 2FA and so far it seems great!

    I assume that if something goes badly wrong, it would still be possible to SSH in to the server and modify the database to disable 2FA for a particular user?

    I see there are some items named “two_factor” in the wp_usermeta table. What would be the minimum changes needed to disable 2FA for a user? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looking through the code, I think this would work in your theme’s functions.php file. Though I have not tested this yet…

    function tf_override_enabled_user_providers($providers, $user_id) {
    	$user_ids_to_bypass = array(123); // User ID's to bypass
    	
    	if(in_array($user_id, $user_ids_to_bypass)) {
    		return array();
    	}
    	
    	return $providers;
    }
    add_filter('two_factor_enabled_providers_for_user', 'tf_override_enabled_user_providers', 11, 2);

    This saved my butt massively ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Instructions for disabling 2FA by updated database?’ is closed to new replies.