# Undo official warning

**URL:** https://meta.discourse.org/t/undo-official-warning/58967
**Category:** Feature
**Created:** [March 13, 2017, 10:28am UTC](https://meta.discourse.org/t/undo-official-warning/58967 "2017-03-13T10:28:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Janno\_Liivak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janno_liivak/32/352215_2.png) [@Janno\_Liivak](https://meta.discourse.org/u/Janno_Liivak)
#### Post date: [March 13, 2017, 10:28am UTC](https://meta.discourse.org/t/undo-official-warning/58967/1 "2017-03-13T10:28:03Z")

</div>

Is it possible to “undo” an official warning? When moderator sends a warning and it turns out that user shouldn’t have got it, can the warning be cancelled? I don’t seem to find any information about it in meta.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 13, 2017, 1:29pm UTC](https://meta.discourse.org/t/undo-official-warning/58967/2 "2017-03-13T13:29:31Z")

</div>

Not really, short of accessing the console directly.

---

<div class="post-metadata">

### Author: ![ryanerwin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryanerwin/32/94589_2.png) [@ryanerwin](https://meta.discourse.org/u/ryanerwin)
#### Post date: [May 30, 2018, 5:47pm UTC](https://meta.discourse.org/t/undo-official-warning/58967/3 "2018-05-30T17:47:11Z")

</div>

How would you delete an official warning from inside the console? Or how would you convert a warning to a regular message?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [May 30, 2018, 6:46pm UTC](https://meta.discourse.org/t/undo-official-warning/58967/4 "2018-05-30T18:46:29Z")

</div>

Warnings are in the `user_warnings` table. If the warning you want to delete is the last warning that was created on your site, you can do that with:

```plaintext
UserWarning.last.destroy

```

If the warning wasn’t the last warning, you can find the warning by searching for user\_warnings by user\_id:

```plaintext
UserWarning.where(user_id: the_user_id)

```

This will give you an array of warnings for that user. You can then destroy the warning by using the warning’s `id`. For example:

```plaintext
UserWarning.find(3).destroy

```

Destroying the warning will leave the PM in place. The PM will no longer be a warning.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 28, 2024, 7:59pm UTC](https://meta.discourse.org/t/undo-official-warning/58967/6 "2024-05-28T19:59:27Z")

</div>

Closed in favour of [Proposal: Undo Official Warning](https://meta.discourse.org/t/proposal-undo-official-warning/291226)
