From 807c2a2d09e8462c7d4cedfb80a57bd8ba44d29d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 13 Apr 2007 08:26:34 +0000 Subject: - Patch #134364 by lyricnz: simplified SQL query --- modules/user/user.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index e0738add4..ebfab256d 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -470,7 +470,7 @@ function user_search($op = 'search', $keys = NULL, $skip_access_check = FALSE) { $find = array(); // Replace wildcards with MySQL/PostgreSQL wildcards. $keys = preg_replace('!\*+!', '%', $keys); - $result = pager_query("SELECT * FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys); + $result = pager_query("SELECT uid, name FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys); while ($account = db_fetch_object($result)) { $find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, array('absolute' => TRUE))); } -- cgit v1.2.3