I have managed to - via the help of template.php and profile_listing.tpl.php - create a nice table with my users. I start and end my taple in profile.module like this
// Extract the affected users:
$result = pager_query('SELECT uid, access FROM {users} WHERE uid > 0 AND status != 0 AND access != 0 AND uid != 3 ORDER BY uid ASC', 40, 0, NULL);
$output = '<table border="0"><tr><th class="name">Name</th><th class="phone">Phone</th><th class="work">Work with</th><th class="other">Other info</th></tr>';
while ($account = db_fetch_object($result)) {
$account = user_load(array('uid' => $account->uid));
$profile = _profile_update_user_fields($fields, $account);
$output .= theme('profile_listing', $account, $profile);
}
$output .= '</table>';
$output .= theme('pager', NULL, 40);
drupal_set_title(t('user list'));
return $output;
}
}
And my profile_listing.tpl.php like this;
profile_load_profile($user->uid)
print $user->name
print $user->profile_place
print $user->mail
|
print $user->profile_phone
if($user->profile_cell):
|