function search_service_users in Services 6.2
Same name and namespace in other branches
- 6 services/search_service/search_service.inc \search_service_users()
- 7 services/search_service/search_service.inc \search_service_users()
Return search results for users.
Parameters
$keys: The keywords to search for within the users.
Return value
An array of search results.
See also
1 string reference to 'search_service_users'
- search_service_service in services/
search_service/ search_service.module - Implementation of hook_service().
File
- services/
search_service/ search_service.inc, line 137 - Link general search functionalities to services module.
Code
function search_service_users($keys) {
// invoke the search hook to generate results
$results = module_invoke('user', 'search', 'search', $keys);
if ($results && is_array($results) && count($results)) {
return $results;
}
return services_error(t('Search returned no results.'), 401);
}