function template_preprocess_profile_listing in Drupal 6
Same name and namespace in other branches
- 7 modules/profile/profile.module \template_preprocess_profile_listing()
Process variables for profile-listing.tpl.php.
The $variables array contains the following arguments:
- $account
- $fields
See also
File
- modules/
profile/ profile.module, line 510 - Support for configurable user profiles.
Code
function template_preprocess_profile_listing(&$variables) {
$variables['picture'] = theme('user_picture', $variables['account']);
$variables['name'] = theme('username', $variables['account']);
$variables['profile'] = array();
// Supply filtered version of $fields that have values.
foreach ($variables['fields'] as $field) {
if ($field->value) {
$variables['profile'][$field->name]->title = $field->title;
$variables['profile'][$field->name]->value = $field->value;
$variables['profile'][$field->name]->type = $field->type;
}
}
}