summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-13 08:26:34 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-13 08:26:34 +0000
commit807c2a2d09e8462c7d4cedfb80a57bd8ba44d29d (patch)
tree06c4bdd99bcb9cbbf779a67a53b5d20836806f63 /modules/user/user.module
parenta2a894ad8d6ff7d74149c843920dc29584f594f1 (diff)
downloadbrdo-807c2a2d09e8462c7d4cedfb80a57bd8ba44d29d.tar.gz
brdo-807c2a2d09e8462c7d4cedfb80a57bd8ba44d29d.tar.bz2
- Patch #134364 by lyricnz: simplified SQL query
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module2
1 files changed, 1 insertions, 1 deletions
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)));
}