MyBB Community Forums

Full Version: Purge Spammer Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I noticed an issue (may just be my site for some reason):

The purge spammer tool works fine, however.. If a usergroup (i.e. Moderator) has permissions to use it, then they should be able to.

 However, I recently discovered that if their primary usergroup (i.e. Member) doesn't have permission to use it, but their additional usergroup does(i.e. Moderator)... then the tool does not work. This issue was solved when I put the member's primary usergroup as a Moderator and his additional usergroup as a member (or in my case "Gold"). Shouldn't it work either way since he is still in the Moderator group?
Purge Spammer uses "is_member" which also checks for additional groups. Not sure what should cause this. Need to recheck but it's more likely that this was caused by the postlimit or other special checks.
(2015-09-21, 12:00 PM)Jones H Wrote: [ -> ]Purge Spammer uses "is_member" which also checks for additional groups.
No, it doesn't (moderation.php):
		$groups = explode(",", $mybb->settings['purgespammergroups']);
		if(!in_array($mybb->user['usergroup'], $groups))
		{
			error_no_permission();
		}
The button in postbit seams not to check permissions at all.
Odd, it should use purgespammer_show instead.

// It even does that a few lines latter. Odd that nobody noticed that.
Quote:The button in postbit seams not to check permissions at all.

That's incorrect:
https://github.com/mybb/mybb/blob/featur...t.php#L399
https://github.com/mybb/mybb/blob/featur...r.php#L733

The moderation.php code should be removed though. Also, purgespammer_show() could be slightly optimised because the 2nd is_member() queries by UID if the get_user() info is not available. Additional groups could be passed as 4th optional parameter and used if its value is other than default , or anything similar (not an empty string because additional groups can be an empty string too).
Progress, any github link to this issue?

Still not working in Mybb 1.8,7,
Added to [Issue #1112]