Skip to:
Content

BuddyPress.org

Ticket #5563: 5563.04.patch

File 5563.04.patch, 1.0 KB (added by r-a-y, 5 years ago)
  • bp-core/bp-core-update.php

     
    459459function bp_core_signups_table_exists() {
    460460        global $wpdb;
    461461
    462         // Some installations may already have a signups table (multisite, plugins, etc...)
    463         if ( ! empty( $wpdb->signups ) ) {
    464                 return true;
    465         }
     462        // Never use bp_core_get_table_prefix() for any global users tables
     463        $wpdb->signups = $wpdb->base_prefix . 'signups';
    466464
    467465        // Suppress errors because users shouldn't see this
    468466        $old_suppress = $wpdb->suppress_errors();
     
    492490function bp_core_signups_id_column_exists() {
    493491        global $wpdb;
    494492
    495         // No signups table to query, so bail and return false
    496         if ( empty( $wpdb->signups ) ) {
    497                 return false;
    498         }
     493        // Never use bp_core_get_table_prefix() for any global users tables
     494        $wpdb->signups = $wpdb->base_prefix . 'signups';
    499495
    500496        // Suppress errors because users shouldn't see this
    501497        $old_suppress = $wpdb->suppress_errors();