blog_id, 'auth_multisite_settings' ); delete_blog_option( get_network()->blog_id, 'auth_multisite_settings_access_users_approved' ); delete_blog_option( get_network()->blog_id, 'auth_version' ); } /** * For security, delete blocked users (since we can't enforce their blocked * status without this plugin enabled, which means they would be able to reset * their passwords and log in). If they have any content, reassign it to the * current user (the user uninstalling the plugin). */ if ( ! is_multisite() ) { $reassign_user = wp_get_current_user(); $blocked_users = get_users( array( 'meta_key' => 'auth_blocked', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key 'meta_value' => 'yes', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value ) ); foreach ( $blocked_users as $blocked_user ) { wp_delete_user( $blocked_user->ID, $reassign_user->ID ); } }