I tried the following code, however, it did not work.
PHP Code:
$allusers = $DB_site->query("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
". iif($show['profilepic'], ',customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline') . "
FROM " . TABLE_PREFIX . "session AS session
". iif($show['profilepic'], "LEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid) ") . "
". iif($vboptions['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ."
WHERE session.lastactivity > $datecut
". iif(!$vboptions['WOLguests'], " AND session.userid = user.userid", "") ."
ORDER BY $sqlsort $sortorder
");
if ($show['profilepic'])
{
$userinfo['profilepic'] = "<img src=\"image.php?u=$userinfo[userid]&type=profile&dateline=$userinfo[profilepicdateline]\" alt=\"\" title=\"$userinfo[username]'s picture\" border=\"0\" />";
}
else
{
$userinfo['profilepic'] = ' not showing';
}
Any ideas?