// Creates a user-profile link for the admin. This function can also be used for many other purposes
function generateUserProfileLink ($userid, $title = '', $what = 'list_user') {
- if (($title == '') && ($title != 0)) {
+ if (($title == '') && ($userid > 0)) {
// Set userid as title
$title = $userid;
} // END - if
if (($title == 0) && ($what == 'list_refs')) {
// Return title again
return $title;
- } // END - if
+ } elseif (isExtensionActive('nickname')) {
+ // Get nickname
+ $nick = getNickname($userid);
+
+ // Is it not empty, use it as title else the userid
+ if (!empty($nick)) $title = $nick . '(' . $userid . ')'; else $title = $userid;
+ }
// Return link
- //* DEBUG: */ outputHtml("a:".$title."<br />");
return '[<a href="{?URL?}/modules.php?module=admin&what=' . $what . '&userid=' . $userid . '" title="{--ADMIN_USER_PROFILE_TITLE--}">' . $title . '</a>]';
}
$content = array(
'sw' => $SW,
'u_link' => generateUserProfileLink($content['userid']),
- 'userid' => $content['userid'],
+ 'userid' => $content['userid'],
'link' => $LINK,
'id' => $ID,
'email' => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender'])." ".$content['surname']." ".$content['family']."</a>",
// Prepare content
$content = array(
- 'sender_link' => adminCreateUserLink($sender),
- 'sender_userid' => $sender,
+ 'sender_link' => generateUserProfileLink($sender),
'subject' => $subj,
'text' => $text,
'url' => generateFrametesterUrl($url),
<tr>
<td width="260" align="center" class="bottom2 right2">
{--EMAIL_SENDER--}:<br />
- <strong><a href="$content[sender_link]">$content[sender_userid]</a></strong>
+ <strong>$content[sender_link]</strong>
</td>
<td width="260" align="center" class="bottom2">
{--EMAIL_SUBJECT--}:<br />