Skip to:
Content

BuddyPress.org

Changeset 8147


Ignore:
Timestamp:
03/20/2014 09:00:43 PM (6 years ago)
Author:
imath
Message:

Exclude members marked as spam from Group Admin autocomplete results

In Groups /wp-admin UI, the autocomplete feature to add a new member to the group need to exclude spammed users.

props DJPaul

Fixes #5359

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-admin.php

    r8051 r8147  
    998998
    999999    $terms = isset( $_GET['term'] ) ? $_GET['term'] : '';
    1000     $users = get_users( array(
    1001         'blog_id'        => false,
    1002         'search'         => '*' . $terms . '*',
    1003         'exclude'        => $group_members,
    1004         'search_columns' => array( 'user_login', 'user_nicename', 'user_email', 'display_name' ),
    1005         'number'         => 10
     1000    $users = bp_core_get_users( array(
     1001        'type'            => 'alphabetical',
     1002        'search_terms'    => $terms,
     1003        'exclude'         => $group_members,
     1004        'per_page'        => 10,
     1005        'populate_extras' => false
    10061006    ) );
    10071007
    1008     foreach ( (array) $users as $user ) {
     1008    foreach ( (array) $users['users'] as $user ) {
    10091009        $return[] = array(
    10101010            /* translators: 1: user_login, 2: user_email */
Note: See TracChangeset for help on using the changeset viewer.