# Force specific users through moderation

**URL:** https://meta.discourse.org/t/force-specific-users-through-moderation/58179
**Category:** Plugin
**Created:** [March 1, 2017, 4:21pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179 "2017-03-01T16:21:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [March 1, 2017, 4:21pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/1 "2017-03-01T16:21:32Z")

</div>

### Overview:

This simple Discourse plugin adds a setting where you can list one or more usernames; any user added to the list will always have their posts held for moderator approval.

e.g. If there is someone who can’t help but be annoying or disruptive sometimes, despite warnings, but also makes worthwhile posts at other times, then you might resort to this so you can filter their good posts from their bad ones rather than ban them outright.

### Alternatives:

Discourse has a built-in option to make Trust Level 0 users require moderation (mainly for forums with spam problems), and you can turn that on and then lock specific users to TL0 so they always require moderation. But if you aren’t having problems with spam then putting all new users’ posts through moderation can be unwelcoming and means their questions are answered slower.

There are also some other moderation options if you search the admin settings area for “moderation” or similar. **I recommend checking them out before using the plugin, as it’s always better to use what’s built-in if you can, and the plugin relies on extending an internal class/method, which could break in future updates.**

On the other hand, if none of the built-in settings fit your needs and you want to moderate one or more people by name, then this plugin is for you.

### Installation:

The plugin is on github as usual: [GitHub - LeoDavidson/discourse-forcemoderation: Discourse plugin to force posts by specified usernames through moderation. · GitHub](https://github.com/leodavidson/discourse-forcemoderation)

Follow the [Install a Plugin](https://meta.discourse.org/t/install-a-plugin/19157) howto, using `git clone https://github.com/leodavidson/discourse-forcemoderation.git` as the plugin command.

Once you’ve installed it, go to /admin/plugins and click the Settings button for the plugin.

You’ll see a checkbox to enable/disable the plugin. It’s disabled by default, so you’ll need to enable it.

You’ll also see an empty field where you can type the usernames of people whose posts you want to be moderated. As with similar options in Discourse, type a name and then push either | (pipe) or return before typing the next one. Each name will turn into a box. Remember to push return after the last name, and then click the green tick button to save the change.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [March 1, 2017, 4:52pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/2 "2017-03-01T16:52:24Z")

</div>

I’m only tossing this out as food for thought.

Discourse has a `muted_users` table. _Assuming_ (yes, I know) that members mute other members because they find them to be a problem, perhaps the “add name” feature could be populated based on an arbitrary threshold?

On second thought, maybe putting accepted Flags into the mix would be a good idea.

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [April 7, 2017, 4:36pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/3 "2017-04-07T16:36:38Z")

</div>

Great plug-in and Thank you.

One question tho, is there any way to have a moderation alert sent to an admin so they know there’s a post that needs moderation?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 7, 2017, 4:57pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/4 "2017-04-07T16:57:43Z")

</div>

I believe it does that already if the post sits there for X hours (default 48).

See setting `notify about flags after` there is also one for pending users `pending users reminder delay`

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [April 15, 2017, 2:16pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/5 "2017-04-15T14:16:02Z")

</div>

I did set that flag to 1 but I dont seem to be getting any emails. Not sure if its the Plug in or something else in discourse.

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [April 15, 2017, 2:20pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/6 "2017-04-15T14:20:40Z")

</div>

Upon further inspection I think the notify flags option is for posts that have been flagged not site notifications.

Thoughts?

---

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [April 15, 2017, 6:09pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/7 "2017-04-15T18:09:20Z")

</div>

Not sure about emails but I get a red icon/count overlay in the top-right of the page next time I visit the site if there are posts needing moderation. (Same with ones blocked by anti-spam measures, and so on.)

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [May 19, 2017, 1:08pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/8 "2017-05-19T13:08:58Z")

</div>

Ok I have confirmed that the `notify about flags after` does not notify about posts needing moderation.

Does anyone know how I can get an alert that a post needs moderation? This plug in is great but without that you need to constantly monitor the site looking for posts needing moderation.

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [May 25, 2017, 2:06pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/9 "2017-05-25T14:06:37Z")

</div>

@LeoDavidson can you help with any of this? I need to get a notification email that something needs to be moderated.

---

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [May 25, 2017, 3:55pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/10 "2017-05-25T15:55:01Z")

</div>

> [@joco](#):
>
> @LeoDavidson can you help with any of this?

Don’t think I can. The plugin just makes a slight change to the criteria Discourse uses to decide whether or not a post needs moderation. The plugin isn’t involved in anything which happens after that.

Even without the plugin, you would presumably see the same behavior with posts that Discourse decides need moderation for other reasons (e.g. due to the anti-spam measures).

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [May 25, 2017, 5:45pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/11 "2017-05-25T17:45:20Z")

</div>

Yea it doesn’t seem to work the same way as FLAGS. When someone flags a post we get an email sent to the moderators if the flag isn’t dealt with.

So when a moderation post is required its not sending the email or alerting moderators like a flag does.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 25, 2017, 9:52pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/12 "2017-05-25T21:52:46Z")

</div>

@neil I thought we had reminders for pending moderation posts? I know I have gotten them before on [discourse.codinghorror.com](http://discourse.codinghorror.com)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 26, 2017, 7:55pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/13 "2017-05-26T19:55:49Z")

</div>

Here’s what we send reminders for:

Pending Users Reminder: if **must approve users** and **pending\_users\_reminder\_delay** \> 0 and there are new users who need to be approved older than the delay, then send a message to moderators.

Pending Queued Post Reminder: if **notify about queued posts after** \> 0, **contact\_email** is set, and there are posts that need to be approved (they aren’t publicly visible yet), then email the contact email.

So I’m guessing that this plugin doesn’t use the must approve users or approve post count settings. It will need to implement its own reminder.

---

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [May 27, 2017, 2:19pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/14 "2017-05-27T14:19:51Z")

</div>

The plugin only augments `DiscourseForceModeration` with an extra check, in addition to the ones Discourse does by default.

I’m assuming anything the plugin causes to go through moderation will be affected by the **notify about queued posts after** setting, if that setting applies to other posts which `DiscourseForceModeration` flags for moderation, but haven’t verified that myself.

> <https://github.com/LeoDavidson/discourse-forcemoderation/blob/master/plugin.rb>

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [June 13, 2017, 2:33pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/15 "2017-06-13T14:33:05Z")

</div>

Any update here? This force moderation is a great idea for a few rogue users we just need a way to be alerted.

-Joe

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [July 6, 2017, 2:47pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/16 "2017-07-06T14:47:53Z")

</div>

@neil can you help here? It seems theres a bug here… the developer says its working right and Discourse isn’t picking up the flag.

---

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [July 8, 2017, 1:36pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/17 "2017-07-08T13:36:18Z")

</div>

I left a couple of messages pending moderation after the plugin flagged them, and after about 24 hours Discourse emailed me to say there were messages pending moderation.

So it does seem to work, and may be a configuration issue with your forum. e.g. Who is set to be emailed and after how much time.

---

<div class="post-metadata">

### Author: ![joco](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@joco](https://meta.discourse.org/u/joco)
#### Post date: [July 9, 2017, 9:50pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/18 "2017-07-09T21:50:31Z")

</div>

Yea I am not getting any alerts of flags for moderation posts. IT works (albeit longer than the 1 hour time limit) for normally flagged posts but the moderation flags do not alert at all.

---

<div class="post-metadata">

### Author: ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)
#### Post date: [August 29, 2017, 4:10pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/19 "2017-08-29T16:10:15Z")

</div>

**v0.2** of the Force Moderation plugin is now in GitHub. The update fixes the plugin for Discourse v1.9.0.beta7 and above.

If you update Discourse, be sure to update the plugin at the same time, and vice versa.

(Nothing bad should happen if one is updated & not the other, except that the plugin won’t have any effect and people you want to be moderated will be able to post normally.)

---

<div class="post-metadata">

### Author: ![rmdawson71](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rmdawson71/32/106206_2.png) [@rmdawson71](https://meta.discourse.org/u/rmdawson71)
#### Post date: [August 7, 2018, 2:42pm UTC](https://meta.discourse.org/t/force-specific-users-through-moderation/58179/20 "2018-08-07T14:42:23Z")

</div>

Our admin install this plugin, but for some reason only admins can access the feature and not moderators. Is there something in the setup to allow moderators to use the feature?

[Next page](https://meta.discourse.org/t/force-specific-users-through-moderation/58179.md?page=2)
