Skip to:
Content

BuddyPress.org

Changeset 6488


Ignore:
Timestamp:
11/05/2012 09:53:25 PM (13 years ago)
Author:
djpaul
Message:

Correct SQL for BP_User_Query for the Member>Friends/Friend Request screens. See #4060

File:
1 edited

Legend:

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

    r6471 r6488  
    303303
    304304            if ( !empty( $friend_ids ) ) {
    305                 $sql['where'][] = "u.{$this->uid_name} NOT IN ({$friend_ids})";
    306             } else {
    307                 // If the user has no friends, make sure the query returns null
     305                $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
     306
     307            // If the user has no friends, and we're not including specific users, make sure the query returns null
     308            } elseif ( empty( $include ) ) {
    308309                $sql['where'][] = $this->no_results['where'];
    309310            }
Note: See TracChangeset for help on using the changeset viewer.