I am building a site where users have access to all the user profiles. When users access (for example) site.com/user/autocomplete/a or site.com/user/autocomplete/b, the site returns all the usernames starting with those letters.
Is there a way to limit the number of returned usernames? When I access https://drupal.org/user/autocomplete/a as logged-in user, I don't get the complete list of usernames starting with a.
Note: I DO want both the autocomplete function and give access to user profiles BUT, I also want to prevent URLS like 'user/autocomplete/a', 'user/autocomplete/b' …etc from listing all account names. Drupal.org has achieved this, and I am trying to find a way to do it on my website.