function userpoints_get_list_row in User Points 7
Same name and namespace in other branches
- 7.2 userpoints.module \userpoints_get_list_row()
2 calls to userpoints_get_list_row()
- userpoints_admin_points in ./
userpoints.admin.inc - Provides an administrative interface for managing points.
- userpoints_list_users in ./
userpoints.pages.inc - Lists the users and their point totals by all or by category.
File
- ./
userpoints.module, line 1970
Code
function userpoints_get_list_row($data) {
global $user;
$categories = userpoints_get_categories();
$details = '';
if ($user->uid == $data->uid) {
$details = " " . l(t("details"), 'myuserpoints');
}
elseif (userpoints_admin_access('edit')) {
$details = " " . l(t("details"), 'user/' . $data->uid . '/points');
}
$name = theme('username', array(
'account' => $data,
));
$row = array(
array(
'data' => $details ? t('!name (!details)', array(
'!name' => $name,
'!details' => $details,
)) : $name,
),
);
if (count($categories) > 1) {
$row[] = array(
'data' => isset($categories[$data->tid]) ? $categories[$data->tid] : $categories[0],
'align' => 'right',
);
}
$row[] = array(
'data' => $data->points,
'align' => 'right',
);
return $row;
}