You are here

function userpoints_service_get in User Points 6

Same name and namespace in other branches
  1. 5.3 userpoints_service.module \userpoints_service_get()
  2. 7.2 userpoints_service/userpoints_service.inc \userpoints_service_get()
  3. 7 userpoints_service.inc \userpoints_service_get()

Get the number of points

1 string reference to 'userpoints_service_get'
userpoints_service_service in ./userpoints_service.module
Implementation of hook_service().

File

./userpoints_service.module, line 82

Code

function userpoints_service_get($uid, $tid = NULL) {
  if (!$uid) {
    return services_error(t('User ID parameter is required.'));
  }
  $points = userpoints_get_current_points($uid, $tid);
  $return = new stdClass();
  $return->points = $points;
  return $return;
}