Activity

  • Alan Teh replied to the question Pagination of Members listing problem in the forum BuddyBoss theme 8 years, 7 months ago

    This was the buggy code in functions.php which was used to filter out some individuals

    //exclude user view in online widget who online and recently online

    function custom_bp_core_get_users($users, $params) {
    $users_ids_to_hide = array(1912,1922,1937);

    if (isset($users['users'])) {
    foreach($users['users'] as $user_idx => $user) {
    if (in_array($user->ID, $users_ids_to_hide) !== false) {
    unset($users['users'][$user_idx]);
    }
    }
    $users['users'] = array_values($users['users']);
    $users['total'] = count($users['users']);
    }

    return $users;
    }
    add_filter( 'bp_core_get_users', 'custom_bp_core_get_users', 10, 2 );