did it:
$args = array(
'count_total' => false,
'number' => (int) $_POST['limit'],
'search' => "{$search_query}*"
);
to
$args = array(
'count_total' => false,
//'number' => (int) $_POST['limit'],
'search' => "{$search_query}*"
);
and
$user_search_results = get_users( $args );
if ( empty( $user_search_results ) ) {
to
$user_search_results_multiple = get_users( $args );
$user_search_results = array_unique($user_search_results_multiple, SORT_REGULAR);
if ( empty( $user_search_results ) ) {
=)
$args = array(
'count_total' => false,
'number' => (int) $_POST['limit'],
'search' => "{$search_query}*"
);
instead of commenting out
'number' => (int) $_POST['limit'],
you can put the number of suggestions maximal shown
instead of commenting out
'number' => (int) $_POST['limit'],
you can put the number of suggestions maximal shown
even not working cause every entry will be fetched over 30 times, so do this:
$user_search_results_multiple = get_users( $args );
$user_search_results = array_unique($user_search_results_multiple, SORT_REGULAR);
array_splice($user_search_results, 6(number of entries shown));
if ( empty( $user_search_results ) ) {