Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/20/2014 06:06:08 AM (10 years ago)
Author:
netweb
Message:

Converter import user meta data improvements and fixes:

  • Original 'old' user meta key is now defined using _bbp_old_user_id
  • Fixes the "Purge Previous Import" optional removal of previously imported users when using the database sync_table.
  • Updates all included importers with the above changes including the custom callback in e107v1.php

See #2650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/converters/e107v1.php

    r5526 r5530  
    379379        /** User Section ******************************************************/
    380380
    381         // Store old User id (Stored in usermeta)
     381        // Store old user id (Stored in usermeta)
    382382        $this->field_map[] = array(
    383383            'from_tablename' => 'user',
    384384            'from_fieldname' => 'user_id',
    385385            'to_type'        => 'user',
    386             'to_fieldname'   => '_bbp_user_id'
    387         );
    388 
    389         // Store old User password (Stored in usermeta serialized with salt)
     386            'to_fieldname'   => '_bbp_old_user_id'
     387        );
     388
     389        // Store old user password (Stored in usermeta serialized with salt)
    390390        $this->field_map[] = array(
    391391            'from_tablename'  => 'user',
     
    569569        if ( !isset( $this->map_userid[$field] ) ) {
    570570            if ( !empty( $this->sync_table ) ) {
    571                 $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
     571                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT value_id, meta_value FROM ' . $this->sync_table_name . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
    572572            } else {
    573                 $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT user_id AS value_id FROM ' . $this->wpdb->usermeta . ' WHERE meta_key = "_bbp_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
     573                $row = $this->wpdb->get_row( $this->wpdb->prepare( 'SELECT user_id AS value_id FROM ' . $this->wpdb->usermeta . ' WHERE meta_key = "_bbp_old_user_id" AND meta_value = "%s" LIMIT 1', $field ) );
    574574            }
    575575
Note: See TracChangeset for help on using the changeset viewer.