function userpoints_usermerge_build_review_form_elements in User Merge 7.2
Implements hook_usermerge_build_review_form_elements() on behalf of userpoints.
File
- includes/
userpoints.usermerge.inc, line 37 - Adds support for User Points. Supplemental include loaded via usermerge_load_includes().
Code
function userpoints_usermerge_build_review_form_elements($review, $account_properties, $user_to_delete, $user_to_keep) {
$points_user_to_delete = userpoints_get_current_points($user_to_delete->uid, 'all');
$points_user_to_keep = userpoints_get_current_points($user_to_keep->uid, 'all');
$properties = $account_properties['userpoints'];
$review['userpoints'] = array(
'#tree' => TRUE,
'#theme' => 'usermerge_data_review_form_table',
'#title' => $properties['title'],
'userpoints' => array(
'property_name' => array(
'#type' => 'markup',
'#markup' => t('User Points'),
),
'options' => array(
'#type' => 'radios',
'#options' => array(
'user_to_delete' => $points_user_to_delete,
'user_to_keep' => $points_user_to_keep,
'merge' => 'merge',
),
'#default_value' => 'merge',
),
),
);
if (isset($properties['description'])) {
$review['userpoints']['#description'] = $properties['description'];
}
return $review;
}