// Add links to the numbers
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . '</a>]';
- if ($content['refid'] > 0) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '%}">'.$content['refid'] . '</a>]';
- if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">' . $content['refs'] . '</a>]';
- if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">' . $content['cats'] . '</a>]';
+ if (isValidUserId($content['refid'])) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '%}">'.$content['refid'] . '</a>]';
+ if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">' . translateComma($content['refs']) . '</a>]';
+ if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">' . translateComma($content['cats']) . '</a>]';
// Fix empty module
if (empty($content['last_module'])) $content['last_module'] = '---';
// Merge more data in
$content = merge_array($content, $templateContent);
- // Set refid link
- if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']);
-
// Get number of unconfirmed mails
$content['links'] = countSumTotalData($content['userid'], 'user_links', 'id', 'userid', true);
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $content['userid'] . '%}">' . translateComma($content['links']) . '</a>]';
$content['locked'] = countSumTotalData($content['userid'], 'user_points', 'locked_points');
// If we have at least one referal, make it clickable to referal list
- if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $content['userid'] . '%}">' . $content['refs'] . '</a>]';
+ if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $content['userid'] . '%}">' . translateComma($content['refs']) . '</a>]';
// Is the lock reason not set?
if (!isset($content['lock_reason'])) $content['lock_reason'] = '---';