How do I clear Warnings?


The intention is to keep them as a paper trail in case there are further issues in the future…

(David Hagar) #4

While I can understand that, I would prefer it if I could keep the paper trail, including when I cleared the warning, but not have it show up for every mod when they look at that persons profile. Or at least have a log or something that says how long ago that was warned. I think it is reasonable to say that a person who had a warning 18 months ago, likely should have a different response for a second issue after 18 months vs after 2 days.

Just my opinion, but that sounds like it would have to be a feature request then.


I’d personally question why you’d have moderators that you can’t trust to be privy to all moderation, but perhaps I’m not understanding your situation.

(David Hagar) #6

That isn’t the case at all. However, I do not see where the system shows a log of when the user when warned or why. Perhaps I’m missing that? I don’t mean to come off as if I don’t like how Discourse works, and perhaps I’m a weird-o, which is highly possible, just trying to get some information is all.

I appreciate all the help.


I think we might be talking at cross purposes.

The title of your topic says how do I ‘clear’ warnings so we’ve been responding to that – there is no way to clear a warning.

Are you actually asking about how you can find the details of a warning?

(David Hagar) #8

I apologize for being unclear. I actually would like to clear the warning but since that isn’t possible. I would like to know how I can view the history of where the warning was given and more particularly when.

I have not had time to really dig into a lot of the moderation features of Discourse yet, which I would like to, but work and school keep me very busy. Normally I would play around with it until I found it on my own but this seemed like it might be more expedient. Sorry if I was confusing, and if etiquette here would lead to me doing a whole new post, I would be happy to do so.

(Mittineague) #9

A moderator does not always need to issue an official warning. I myself quite often send “friendly messages” at another forum I’m a moderator for. I consider them to be a kind of “free pass” for a first offense.

(David Hagar) #10

Well, to go into more detail. I have a user, which has a warning. I don’t know why, I’ve asked my Moderators but none of them remember doing it. Now I have gone through a few Moderators in the early days of setting things up, so it is possible one of them did it.

I know the person personally and I can’t imagine why they were issued a warning, but I can’t find it anywhere when it was issued. This is what lead to the small issue of wanting to clear it. Since that isn’t possible, I have become curious as to why it was done and when and by whom. I know this is a bit specific and a lot of information that isn’t needed, but that is this minor situation in a nutshell.

(Mittineague) #11

Unfortunately, Warnings aren’t logged. But it should be possible do dig up some information using the Data Explorer plugin.

(Joshua Rosenfeld) #12

I thought warnings appeared on top of a user’s public profile…let me look.

Nope…just the count, no link to them.

If you have the staff notes plugin installed warnings are automatically added as a note to the user, but that only helps if you had the plugin installed before issuing the warnings.

(Mittineague) #13

This should help in tracking it down. It requires needing to know the member’s id

-- [params]
-- int :member_id = 1

SELECT user_warnings.topic_id 
  , user_warnings.user_id 
  , user_warnings.created_by_id 
  , user_warnings.created_at 
  , user_warnings.updated_at 
  , users.username AS moderator 
FROM user_warnings 
JOIN users ON user_warnings.created_by_id = 
WHERE user_warnings.user_id = :member_id 


(David Hagar) #14

What is that, where would I put those commands in?

(Mittineague) #15

That’s capable to do in the Data Explorer plugin page.

You could run the query in the database console by replacing “:member_id” with the member’s id number and omitting the “params” part. (it wouldn’t look as nice or give you links to click, but it would work)

SELECT user_warnings.topic_id 
  , user_warnings.user_id 
  , user_warnings.created_by_id 
  , user_warnings.created_at 
  , user_warnings.updated_at 
  , users.username AS moderator 
FROM user_warnings 
JOIN users ON user_warnings.created_by_id = 
WHERE user_warnings.user_id = :member_id 

(Gökhan Gurbetoğlu) #16

Thanks for the tip. Is it safe to delete these warnings from Data Explorer? I have a warning given to me by myself while testing and it kind of needs to be taken care of :slight_smile:

(Mittineague) #17

The Data Explore plugin does SELECTs only. It is a very safe way to interact with the database and can not break your database.

An improperly crafted DELETE query could result in bugs or worse, an unusable database. (AFAIK, Discourse does not have any “on delete cascade” code in the Core)

If this is only because you don’t like having an “embarrassing stain” associated with your account, IMHO it would be better to leave the database alone and make it publically known to those that need to know that the warning has no importance.

If the warning is interfering with your Admin abilities in some way, that is much more of a concern and it should be addressed. Is the warning causing problems for you?

(Gökhan Gurbetoğlu) #18

It has no effect on any admin abilities nor cause any misunderstandings, only cosmetic concerns :slight_smile: Thank you for the reply, I guess I could stick with it.

(Mittineague) #19

It may not be as visible as you think it is.

Admins can see the red warning icon on a member’s profile page and the red envelope icon next to the warning message

Moderators can see the red warning icon, but not the warning message

The member does not see the red warning icon but can see the red envelope warning message

Other members can not see the warning nor the message icons.

So the only ones that might wonder about the warning are the moderators.

(Kane York) #20

On that note, it might be a good idea to add the @staff group to warning messages when you tick the “This is an official warning” checkbox. (Allow it to be removed before sending, but that should be the default.)

(Mittineague) #21

I don’t think moderators should be able to access members’ messages, except for official warning messages. We use the User Note plugin which provides a link to warning messages.

Different forums may treat violations differently, but personally I prefer corrective measures to be incremental so knowing how many times a violation has occurred is important. eg. (over simplified, but in general, similar to this)

  • first minor violation - member gets a “friendly” message.
  • first repeat of minor violation - member gets warning message if repeated within a relatively short amount of time after the first, else another friendly message
  • second repeat of minor violation - temporary suspension
  • third repeat of minor violation - long term suspension

tl;dr Knowing what the violation was, when it was, and how many chances a member has had to correct their behavior is important.

(Joshua Rosenfeld) #22

The Staff Notes plugin is a great tool here. I’ve seen a number of sites using it for just this purpose (making all staff aware of warnings). While seeing the actual warning may be convenient, the true need here is knowing what the warning is for, not reading the full content. A staff note saying something like “issued first warning for excessive swearing” should suffice for most cases.