Skip to:
Content

BuddyPress.org

Changeset 7117


Ignore:
Timestamp:
05/28/2013 02:53:44 AM (7 years ago)
Author:
boonebgorges
Message:

Don't wipe out the user_id param passed to BP_XProfile_Field::populate()

This fixes a bug introduced in r3369 in an attempt to remove a WP_DEBUG
notice, but inadvertantly prevented plugins from directly calling the
populate() method using the user_id param.

Fixes #4912

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r7030 r7117  
    454454        global $wpdb, $userdata, $bp;
    455455
    456         // @todo Why are we nooping the user_id ?
    457         $user_id = 0;
    458         if ( is_null( $user_id ) )
     456        if ( empty( $user_id ) ) {
    459457            $user_id = $userdata->ID;
     458        }
    460459
    461460        $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_fields} WHERE id = %d", $id );
Note: See TracChangeset for help on using the changeset viewer.