function _user_resource_retrieve in Services 6.3
Same name and namespace in other branches
- 7.3 resources/user_resource.inc \_user_resource_retrieve()
Get user details.
Parameters
$uid: UID of the user to be loaded.
Return value
A user object.
See also
1 string reference to '_user_resource_retrieve'
- _user_resource_definition in resources/
user_resource.inc - @file This file will define the resources for dealing with the user object
File
- resources/
user_resource.inc, line 192 - This file will define the resources for dealing with the user object
Code
function _user_resource_retrieve($uid) {
$account = user_load($uid);
if (empty($account)) {
return services_error(t('There is no user with such ID.'), 404);
}
services_remove_user_data($account);
// Everything went right.
return $account;
}