Commit 30450039 authored by Dries's avatar Dries
Browse files

- Patch #40583 by canen: make user_autocomplete function work with PostgreSQL.

parent d55a508b
......@@ -1930,7 +1930,7 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') {
*/
function user_autocomplete($string) {
$matches = array();
$result = db_query_range('SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER("%s%%")', $string, 0, 10);
$result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
while ($user = db_fetch_object($result)) {
$matches[$user->name] = check_plain($user->name);
}
......
......@@ -1930,7 +1930,7 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') {
*/
function user_autocomplete($string) {
$matches = array();
$result = db_query_range('SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER("%s%%")', $string, 0, 10);
$result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
while ($user = db_fetch_object($result)) {
$matches[$user->name] = check_plain($user->name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment