diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b7b010941..57488f2b3 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1824,13 +1824,19 @@ function is_blog_installed() { $tables = $wpdb->get_col('SHOW TABLES'); $wpdb->suppress_errors( $suppress ); - $wp_tables = $wpdb->tables( 'all' ); + $wp_tables = $wpdb->tables(); // Loop over the WP tables. If none exist, then scratch install is allowed. // If one or more exist, suggest table repair since we got here because the options // table could not be accessed. foreach ( $wp_tables as $table ) { // If one of the WP tables exist, then we are in an insane state. if ( in_array( $table, $tables ) ) { + // The existence of custom user tables shouldn't suggest an insane state or prevent a clean install. + if ( defined( 'CUSTOM_USER_TABLE' ) && CUSTOM_USER_TABLE == $table ) + continue; + if ( defined( 'CUSTOM_USER_META_TABLE' ) && CUSTOM_USER_META_TABLE == $table ) + continue; + // If visiting repair.php, return true and let it take over. if ( defined('WP_REPAIRING') ) return true;