Remove group from memberslist
English Muffin Offline
Junior Member
**
Posts: 15
Joined: Apr 2010
Post: #1
Remove group from memberslist
Hello,

I know by default MyBB doesn't have a way for people to choose which groups are displayed on the memberslist, however I think that would be a great plugin.

I need a plugin to stop the members in awaiting activation (not activated their account) from being displayed on the memberslist.

Could someone develop the plugin, or tell me he core edit to do so please.

Many thanks!
Found the core hack Smile

PHP Code:
if($user['usergroup'] == 5 && $mybb->user['usergroup'] != 4)
        {
            continue;
        } 

Which shows them only to admins which will do Smile

(This post was last modified: 07-04-2011 01:26 AM by English Muffin.)
07-04-2011 01:20 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Remove group from memberslist
The above isn't exactly the best solution because paging won't necessarily work correctly for non-admins - that is, if you have 20 users per page, and there's 2 awaiting activation, normal users will see 18 on that particular page.
But it may be sufficient for your needs.

My Blog
07-04-2011 10:44 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: Remove group from memberslist
Something like this?

memberlist.php, line #188:

PHP Code:
1
2
3
4
5
6
// Yahoo! Messenger address
if(trim($mybb->input['yahoo']))
{
	$search_query .= " AND u.yahoo LIKE '%".$db->escape_string_like($mybb->input['yahoo'])."%'";
	$search_url .= "&yahoo=".urlencode($mybb->input['yahoo']);
}


And add this code after the code above:

PHP Code:
if($mybb->user['usergroup'] != 4){
	$search_query .= ' AND u.usergroup!=5';
}


07-05-2011 02:16 AM
Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #4
RE: Remove group from memberslist
Open memberlist.php and find:

PHP Code:
eval("\$users .= \"".$templates->get("memberlist_user")."\";");


replace with:

PHP Code:
if($user['usergroup'] != "5") {
		eval("\$users .= \"".$templates->get("memberlist_user")."\";");
		}


After that all users in group "Awaiting Avtivation" will not displayed in memberlist.

Regards
TriTop

07-06-2011 03:30 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: