This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Including user roles when do user search #30706
    zpintar27zpintar27
    Participant

    Yea! Now works!

    Thanks for quick response.

    Great plugin, worth that money! 🙂

    in reply to: Including user roles when do user search #30696
    zpintar27zpintar27
    Participant

    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;
    }
    in reply to: Including user roles when do user search #30606
    zpintar27zpintar27
    Participant

    Ok, I’ll try with this filter, but maybe it will be wise to think about including this feature into plugin. 😉

Viewing 3 posts - 1 through 3 (of 3 total)