diff --git a/masquerade.module b/masquerade.module index be5a94b..de0f590 100644 --- a/masquerade.module +++ b/masquerade.module @@ -669,8 +669,8 @@ function masquerade_autocomplete($string) { $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:string)", 0, 10, array( ':string' => $string . '%', )); - foreach ($result as $user) { - $matches[$user->name] = check_plain($user->name); + foreach ($result as $account) { + $matches[$user->name] = format_username($account); } if (module_exists('devel')) { $GLOBALS['devel_shutdown'] = FALSE; @@ -707,8 +707,8 @@ function masquerade_autocomplete_multiple($string, $add_anonymous = TRUE) { $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE :string", 0, 10, array( ':string' => $last_string . '%', )); - foreach ($result as $user) { - $matches[$prefix . $user->name] = check_plain($user->name); + foreach ($result as $account) { + $matches[$prefix . $account->name] = format_username($account); } // Remove existing tags. @@ -719,8 +719,8 @@ function masquerade_autocomplete_multiple($string, $add_anonymous = TRUE) { $result = db_query_range("SELECT u.alt_login AS alt_login FROM {alt_login} u WHERE LOWER(u.alt_login) LIKE LOWER(:string)", 0, 10, array( ':string' => $last_string . '%', )); - foreach ($result as $user) { - $matches[$user->alt_login] = check_plain($user->alt_login); + foreach ($result as $account) { + $matches[$account->alt_login] = format_username($account); } } }