gave me some headache but finally came up with this solution for the online_query hook:
PHP Code:
// showmembers is used for 'all' and 'members' selection, therefore we have to check for ISNULL before removing banned users.
// If not showmembers, the banned users are removed anyway as they are users.
$hook_query_where .= iif($showmembers,
" AND
(
ISNULL(user.username)
OR
(NOT ISNULL(user.username) AND user.usergroupid <> 8)
)",
"");
The problem is, that the usergroupid only exists for users (incl. banned ones). But guests and robots only have NULL values. This screwed up the whole procedure.
The showmember condition is needed, because otherwise ISNULL is checked twice and non-guests are included again.