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-template.php

    r5230 r5301  
    159159
    160160    $defaults = array(
    161         'user_id'           => $bp->displayed_user->id,
     161        'user_id'           => bp_displayed_user_id(),
    162162        'profile_group_id'  => false,
    163163        'hide_empty_groups' => true,
     
    689689        $defaults = array(
    690690            'field'   => false, // Field name or ID.
    691             'user_id' => $bp->displayed_user->id
     691            'user_id' => bp_displayed_user_id()
    692692        );
    693693
     
    774774        global $bp;
    775775
    776         $last_updated = bp_get_user_meta( $bp->displayed_user->id, 'profile_last_updated', true );
     776        $last_updated = bp_get_user_meta( bp_displayed_user_id(), 'profile_last_updated', true );
    777777
    778778        if ( $last_updated )
     
    804804    global $bp;
    805805
    806     if ( !bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'no_grav' => true ) ) )
     806    if ( !bp_core_fetch_avatar( array( 'item_id' => bp_displayed_user_id(), 'no_grav' => true ) ) )
    807807        return false;
    808808
Note: See TracChangeset for help on using the changeset viewer.