I’ve just tried your code, but doesn’t work!
When it’s applied no user is searched out. Are you sure that’s code is OK? (because I found some typos)
add_filter("asp_query_args", "asp_query_args_change", 10, 2);
function asp_query_args_change($args, $search_id) {
if ($search_id == 2) {
// Roles list
$roles = array('um_clanovi-udruge');
global $wpdb;
$args['user_meta_filter'][] = array(
'key' => $wpdb->base_prefix."capabilities",
'value' => $roles,
'operator' => 'IN',
'allow_missing' => false
);
}
return $args;
}