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-groups/bp-groups-template.php

    r5189 r5301  
    238238
    239239    // User filtering
    240     if ( !empty( $bp->displayed_user->id ) )
    241         $user_id = $bp->displayed_user->id;
     240    if ( bp_displayed_user_id() )
     241        $user_id = bp_displayed_user_id();
    242242
    243243    // Type
     
    698698
    699699function bp_group_show_no_groups_message() {
    700     global $bp;
    701 
    702     if ( !groups_total_groups_for_user( $bp->displayed_user->id ) )
     700    if ( !groups_total_groups_for_user( bp_displayed_user_id() ) )
    703701        return true;
    704702
Note: See TracChangeset for help on using the changeset viewer.