Active
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2012 at 15:41 UTC
Updated:
6 Mar 2013 at 15:19 UTC
Due to lots of (spammy?) user names and a less than ideal sort/search algorithm, the user autocomplete fields are failing on d.o, see example:

1. Direct matches must be listed at the top — I can't seem to select 'sun' at all anymore...
2. Lower-case letters should be sorted above upper-case ones, because they are more likely to match relevant people (given the current distribution of names among active contributors), at least after the first letter. See http://drupal.org/site-maintainers for some anecdotal evidence. Maybe just sort all-caps names all the way to the bottom.
3. The height of the drop-down list should probably be increased.
| Comment | File | Size | Author |
|---|---|---|---|
| d.o-user-autocomplete.png | 8.15 KB | salvis |
Comments
Comment #1
killes@www.drop.org commentedI am not sure I am moving this to the right project, but it's clearly better than "webmasters'".
Comment #2
dwwWe're just using views core's user autocomplete callbacks here. I'm not sure what project_issue is supposed to do about this. See views_ajax_autocomplete_user() in modules/views/includes/ajax.inc for more. They're intentionally doing case-insensitive matching (probably for good reason).
Agreed that an exact match would like to be first, but that'd be an extra query for every autocomplete AJAX request (probably not a good idea on a site as big/busy as d.o). If you already know the exact match, you don't have to use the autocomplete at all -- just type the name, don't use the mouse or arrow keys, and you're done.
One actionable bug report in here is that the query is not filtering out records from {users} with status blocked. Arguably, that's an information disclosure security bug (although incredibly minor). However, I'm going to unpublish this for now and open a sec.d.o issue about it, just in case the rest of the sec team cares enough to handle this as a security issue.
Comment #3
dwwFYI: I opened this as https://security.drupal.org/node/81878 -- let's see what the rest of the sec team thinks...
Comment #4
gregglesThe result of the issue linked in #3 is that it can be fixed in public. So, patches welcome.