Code:
$forumusers = $db->query_read_slave("
SELECT userid, usergroupid, ipaddress AS host, '' AS useragent, IF(usergroupid IN(" . iif($vbulletin->options['digitalpoint_usermap_admins'], $db->escape_string($vbulletin->options['digitalpoint_usermap_admins']), 0) . "), 1, IF(userid > 0, 2, 3)) AS sortorder
FROM " . TABLE_PREFIX . "user AS user
ORDER BY sortorder
LIMIT 5000" . "
");
One other thing, I'm using the above code for registered users, is it also possible to have the pins link to the members profile, rather than Google Earth?