function facetapi_callback_user_values in Facet API 6
Returns all user names.
Parameters
$facet: An array containing the facet definition.
Return value
An array of values passed as options to the form element.
1 string reference to 'facetapi_callback_user_values'
- facetapi_facetapi_facet_info in ./
facetapi.module - Implementation of hook_facetapi_facet_info().
File
- ./
facetapi.callbacks.inc, line 178 - Various callbacks referenced in facet definitions.
Code
function facetapi_callback_user_values(array $facet) {
$users = array();
$sql = "SELECT uid, name FROM {users} WHERE status = 1";
if ($result = db_query($sql)) {
while ($record = db_fetch_object($result)) {
$users[$record->uid] = check_plain($record->name);
}
}
return $users;
}