diff --git src/bp-xprofile/bp-xprofile-classes.php src/bp-xprofile/bp-xprofile-classes.php
index 522bb45..2583b01 100644
|
|
class BP_XProfile_Group { |
150 | 150 | |
151 | 151 | $where_sql = ''; |
152 | 152 | |
153 | | if ( !empty( $profile_group_id ) ) |
| 153 | if ( ! empty( $profile_group_id ) ) |
154 | 154 | $where_sql = $wpdb->prepare( 'WHERE g.id = %d', $profile_group_id ); |
155 | | elseif ( $exclude_groups ) |
156 | | $where_sql = $wpdb->prepare( "WHERE g.id NOT IN ({$exclude_groups})"); |
| 155 | elseif ( $exclude_groups ) { |
| 156 | $exclude_groups = join( ',', wp_parse_id_list( $exclude_groups ) ); |
| 157 | $where_sql = "WHERE g.id NOT IN ({$exclude_groups})"; |
| 158 | } |
157 | 159 | |
158 | 160 | if ( ! empty( $hide_empty_groups ) ) { |
159 | 161 | $group_ids = $wpdb->get_col( "SELECT DISTINCT g.id FROM {$bp->profile->table_name_groups} g INNER JOIN {$bp->profile->table_name_fields} f ON g.id = f.group_id {$where_sql} ORDER BY g.group_order ASC" ); |