MyBB Central

Full Version: Not show banned members on memberlist?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello there!

Is it possible to not have the banned members on the memberlist?
Anyone?
Not without a modification.
I thought so...but with which mod I can do this?
There isn't one. But IMHO you should be able to remove banned members from the member list as standard MyBB.
Should be made in PHP...i've tried some things, but with no result.
Maybe some of my friends can change this...
You can alter the actual sql query in the file. Add a "NOT in usergroup='7'" should do it.
So this query:

$query = $db->query("
SELECT u.*, f.*
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
WHERE {$search_query}
ORDER BY {$sort_field} {$sort_order}
LIMIT {$start}, {$per_page}
");
Try this

$query = $db->query("
SELECT u.*, f.*
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
WHERE {$search_query} AND usergroup != '7'
ORDER BY {$sort_field} {$sort_order}
LIMIT {$start}, {$per_page}
");
works almost!
The're not on the list anymore...but now i've got a lot of empty pages...
see the attachment please.
Oh that's a join...try this:

$query = $db->query("
SELECT u.*, f.*
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
WHERE {$search_query} AND u.usergroup != '7'
ORDER BY {$sort_field} {$sort_order}
LIMIT {$start}, {$per_page}
");
Pages: 1 2