Commit 00e7e7f5 authored by hass's avatar hass
Browse files

#2189791: Undefined index notice in realname_autocomplete()

parent d5f36be0
......@@ -351,7 +351,7 @@ function realname_autocomplete($field_name, $entity_type, $bundle_name, $string
$accounts = user_load_multiple($uids);
foreach ($accounts as $account) {
$matches[t('!account (@uid)', array('!account' => $matches[$account->name], '@uid' => $account->uid))] = t('!realname (@username)', array('!realname' => $matches[$account->name], '@username' => $account->name));
$matches[t('!account (@uid)', array('!account' => format_username($account), '@uid' => $account->uid))] = t('!realname (@username)', array('!realname' => format_username($account), '@username' => $account->name));
}
}
// User autocomplete fields.
......@@ -368,7 +368,7 @@ function realname_autocomplete($field_name, $entity_type, $bundle_name, $string
$accounts = user_load_multiple($uids);
foreach ($accounts as $account) {
$matches[$account->name] = t('!realname (@username)', array('!realname' => $matches[$account->name], '@username' => $account->name));
$matches[$account->name] = t('!realname (@username)', array('!realname' => format_username($account), '@username' => $account->name));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment