Posted by dolu on May 14, 2012 at 10:26am
3 followers
| Project: | Masquerade |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Hello,
There is a small issue when searching for a username in autocomplete.
Only usernames that are starting with the keyword are returned.
Here's is a patch that will return usernames that contains the keyword.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| masquerade-autocomplete.patch | 745 bytes | Ignored: Check issue status. | None | None |
Comments
#1
#2
#3
Sorry,
Previous patch doesn't work as expected.
Try this one instead :
#4
Your patch changes search to
starting with...as for me this makes no sense because this regression from current functionaly.#5
I'm not sure to understand what you say.
This patch allows searching usernames that contain the keyword rather than starting with the keyword.
Let's say we have a
john.smithusername.Before, if I typed
smith, I found nothing.With this patch, you would find
john.smith.#6
+++ b\masquerade.module@@ -555,7 +555,7 @@
- $result = db_query_range("SELECT u.name FROM {users} u WHERE LOWER(u.name) LIKE LOWER('%%%s%%')", $string, 0, 10);
+ $result = db_query_range("SELECT u.name FROM {users} u WHERE LOWER(u.name) LIKE LOWER('%s%%')", $string, 0, 10);
but your batch suggests %s%% whick means starting with
#7
Oh, sorry, my mistake.
I inverted the two files.
Here it is :
#8
Re-titled and makes sense so let's get more reviews
#9
this change should be ported to 7.x first and require review of other mainteiners
#10
I'll commit stuff that for 7 with no 6 patch, but not the other way around.