- Patch #1454630 by mottihoresh: user_autocomplete() page callback uses as a local variable (coding standards, bad example).

8.0.x
Dries 2012-03-23 16:03:55 -06:00
parent 938baf76b4
commit 0de82eeffe
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ function user_autocomplete($string = '') {
$matches = array(); $matches = array();
if ($string) { if ($string) {
$result = db_select('users')->fields('users', array('name'))->condition('name', db_like($string) . '%', 'LIKE')->range(0, 10)->execute(); $result = db_select('users')->fields('users', array('name'))->condition('name', db_like($string) . '%', 'LIKE')->range(0, 10)->execute();
foreach ($result as $user) { foreach ($result as $account) {
$matches[$user->name] = check_plain($user->name); $matches[$account->name] = check_plain($account->name);
} }
} }