function facetapi_callback_uid_map in Facet API 6
Converts UIDs to username.
Parameters
$uids: An array containing the user IDs.
Return value
An array mapping user IDs to usernames.
1 string reference to 'facetapi_callback_uid_map'
- facetapi_facetapi_facet_info in ./
facetapi.module - Implementation of hook_facetapi_facet_info().
File
- ./
facetapi.callbacks.inc, line 17 - Various callbacks referenced in facet definitions.
Code
function facetapi_callback_uid_map(array $uids) {
$sql = '
SELECT uid AS id, name
FROM {users}
WHERE uid IN (!placeholders)
';
$map = facetapi_map_query($sql, $uids);
if (isset($map[0])) {
$map[0] = variable_get('anonymous', t('Anonymous'));
}
return $map;
}