Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 01:14:31 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use bp_displayed_user_id() rather than reference the $bp->displayed_user->id global var directly. First step at consolidating user ID checks to use WP_User class later. See #3738.

File:
1 edited

Legend:

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

    r5293 r5301  
    113113        $defaults = array(
    114114            'profile_group_id'  => false,
    115             'user_id'           => $bp->displayed_user->id,
     115            'user_id'           => bp_displayed_user_id(),
    116116            'hide_empty_groups' => false,
    117117            'hide_empty_fields' => false,
     
    945945
    946946        if ( !$user_ids )
    947             $user_ids = $bp->displayed_user->id;
     947            $user_ids = bp_displayed_user_id();
    948948
    949949        if ( is_array( $user_ids ) ) {
     
    964964
    965965        if ( !$user_id )
    966             $user_id = $bp->displayed_user->id;
     966            $user_id = bp_displayed_user_id();
    967967
    968968        $field_sql = '';
     
    10401040
    10411041        if ( !$user_id )
    1042             $user_id = $bp->displayed_user->id;
     1042            $user_id = bp_displayed_user_id();
    10431043
    10441044        $field_name = bp_xprofile_fullname_field_name();
Note: See TracChangeset for help on using the changeset viewer.