Line 336 of masquerade.module:
$result = db_query_range("SELECT u.name FROM {users} u WHERE LOWER(u.name) LIKE LOWER('%s%%')", $string, 0, 10);

I suggest changing the LIKE LOWER() clause to:
LIKE LOWER('%%%s%%')

That way admins (or whomever) that's using masquerade can search for users even if they only know an arbitrary portion of a username.

Comments

deviantintegral’s picture

Status: Active » Closed (won't fix)

I'm going to mark this as won't fix as that query is identical to how Drupal's built-in user autocomplete works. Having it behave differently then other user autocomplete fields will cause confusion. Thanks for the suggestion.