You are here

function _services_raw_user_retrieve in Services Client 7.2

Same name and namespace in other branches
  1. 7 services_raw/services_raw.inc \_services_raw_user_retrieve()

Load user from database. This method don't filter user passwords

Parameters

$uid:

Return value

mixed

1 string reference to '_services_raw_user_retrieve'
_services_raw_services_resources in services_raw/services_raw.inc
Provides API definition of provided services objects and operations.

File

services_raw/services_raw.inc, line 709
Custom services definition and implementation of all callbacks.

Code

function _services_raw_user_retrieve($uid) {
  $account = user_load($uid);
  if (empty($account)) {
    return services_error(t('There is no user with ID @uid.', array(
      '@uid' => $uid,
    )), 404);
  }

  // Everything went right.
  return $account;
}