function pcp_get_user_additional_values in Profile Complete Percent 6.2
Same name and namespace in other branches
- 7 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.:
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 304 - Allows users with valid permissions to tag profile fields created from the profile module as required fields for a users profile to be considered complete.
Code
function pcp_get_user_additional_values($uid) {
$values = array();
if ($uid) {
$account = user_load($uid);
$values['user_picture'] = $account->picture;
if (module_exists('user_terms')) {
$user_terms_vocabs = variable_get('pcp_enabled_user_terms_vocabs', array());
foreach ($account->user_terms as $term) {
$vid = $term['vid'];
$values['user_terms_' . $vid][] = $term;
}
}
}
return $values;
}