2020-09-21, 02:43 PM
(This post was last modified: 2020-09-22, 09:53 PM by volkling. Edited 1 time in total.)
Edit: This was solved here.
I'm using the below code to compile the list of users from a specific group:
What is the correct way to display a specific custom profile field next to the user title? " '.$userfields["fid4"].'" This variable does not work.
I'm using the below code to compile the list of users from a specific group:
<?php
global $headerinclude, $header, $theme, $footer, $db, $xtpf, $userfields;
$altbg = alt_trow();
$userlist = '';
$query = $db->simple_select("users", "*", "usergroup IN ('8')", array("order_by" => 'username', "order_dir" => 'ASC'));
while($users = $db->fetch_array($query))
{
$username = build_profile_link(format_name(htmlspecialchars_uni($users['username']), $users['usergroup'], $users['displaygroup']), $users['uid']);
$userlist .= '<tr><td class="'.$altbg.'">'.$username.', '.$users["usertitle"].' '.$userfields["fid4"].'</td></tr>';
$altbg = alt_trow();
}
$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="'.$theme['borderwidth'].'" cellpadding="'.$theme['tablespace'].'" class="tborder">
<thead>
<tr>
<td class="thead">
<strong>'.$pages['name'].'</strong>
</td>
</tr>
</thead>
<tbody>
{$userlist}
</tbody>
</table>
<br />
{$footer}
</body>
</html>';
$template=str_replace("\'", "'", addslashes($template));
add_breadcrumb($pages['name']);
eval("\$page=\"".$template."\";");
output_page($page);
?>
What is the correct way to display a specific custom profile field next to the user title? " '.$userfields["fid4"].'" This variable does not work.