MyBB Community Forums

Full Version: Bulk Moderation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have noticed that a number of registered users have contravened my forum regulations by having links to commercial web sites in their signatures. I have been manually editing the account settings for each user but this is a tedious task. So, two questions:

  1. I locate users by searching for 'url' in their signature and then edit account settings via the ACP but is there a way I can do this in bulk? I guess it would be a case of running a few SQL commands directly on the database.
  2. Is it possible to extend the inline moderation drop-down to include customised tasks like this to make such things easier in the future?
Thanks
Assuming you have access to phpmyadmin.

In all the below queries, substtute mybb16_ with your own table prefix

To get the users that have 'url' in their signature:

SELECT *
FROM `mybb16_users`
WHERE `signature` LIKE '%url%'

^^ This will select all users that have 'url' anywhere in the signature, run this first to see which users will get affected by the following update sql below. You might get false positives such as someone who has something like 'curly' in their signature will also get selected. You can make the search term more restrictive to get only the results you want to change.

Next, you did not say what you are editing in the admin cp for these users, but, assuming you want to suspend their signature:

Make sure you make the changes in the calls below with the ones you made in the select call above to change only the users you got above.

UPDATE `mybb16_users` SET `suspendsignature` = 1 WHERE `signature` LIKE '%url%'

Or to simply remove their signature:
UPDATE `mybb16_users` SET `signature` = '' WHERE `signature` LIKE '%url%'
OK, thanks - I'll give that a try.

Is there any documentation beyond browsing the database saying what fields hold what data?

Thanks again.

David
Since we're on the matter of url's in the first place, is there a way to either remove url's completely from the signature (not making a link of it) or a way to admin approve all links in a signature ?
To eliminate false positives use this instead :

UPDATE mybb16_users SET signature = '' WHERE signature LIKE '%[/url]%'