diff options
Diffstat (limited to 'modules/user/user.pages.inc')
-rw-r--r-- | modules/user/user.pages.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index 4d2a575f6..7f40eadd6 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -12,7 +12,7 @@ function user_autocomplete($string = '') { $matches = array(); if ($string) { - $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", 0, 10, array(':name' => $string . '%')); + $result = db_select('users')->fields('users', array('name'))->condition('name', db_like($string) . '%', 'LIKE')->range(0, 10)->execute(); foreach ($result as $user) { $matches[$user->name] = check_plain($user->name); } |