You are here

function pcp_get_user_additional_values in Profile Complete Percent 7

Same name and namespace in other branches
  1. 6.2 pcp.module \pcp_get_user_additional_values()

Return a users additional field values that have been saved for a given user.

Parameters

int $uid: The uid of the user we are returning data for.

$entity_type: The type of entity to return fields for.

$bundle: (optional) NULL The bundle to return fields for

Return value

assoc array of all profile fields for the user.

1 call to pcp_get_user_additional_values()
pcp_get_complete_percentage_data in ./pcp.module
Get the profile complete percentage data for a given user.

File

./pcp.module, line 417
Allows users with valid permissions to tag profile fields (core fields or Profile2 fields) for a users profile to be considered complete.

Code

function pcp_get_user_additional_values($uid, $entity_type, $bundle = NULL) {
  $values = array();
  if ($uid && $entity_type == 'user') {
    $account = user_load($uid);
    $values['user_picture'] = $account->picture;
  }
  return $values;
}