- Patch #1454630 by mottihoresh: user_autocomplete() page callback uses as a local variable (coding standards, bad example).
parent
938baf76b4
commit
0de82eeffe
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue