# Desativado por equipe não estar logada

**URL:** https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944
**Category:** Bug
**Created:** [29 Abril , 2018 18:48 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944 "2018-04-29T18:48:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![k4rtik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/k4rtik/32/119508_2.png) [@k4rtik](https://meta.discourse.org/u/k4rtik)
#### Post date: [29 Abril , 2018 18:48 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/1 "2018-04-29T18:48:54Z")

</div>

> [@Tab to see deactivated users](https://meta.discourse.org/t/tab-to-see-deactivated-users/34255/1):
>
> You can sort of see that at /admin/logs/screened\_emails.

Actually that doesn’t show the list of deactivated users. Any other way to see them? I deactivated three users earlier this week and cannot find the list even in the staff action log.

---

<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: [29 Abril , 2018 19:05 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/2 "2018-04-29T19:05:40Z")

</div>

> [@Tab to see deactivated users](https://meta.discourse.org/t/tab-to-see-deactivated-users/34255/3):
>
> cannot find the list even in the staff action log.

You can go to  
Admin → Logs → Staff Actions  
and filter by  
deactivate user

The users that were deactivated should appear beneath Subject

They don’t?

---

<div class="post-metadata">

### Author: ![k4rtik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/k4rtik/32/119508_2.png) [@k4rtik](https://meta.discourse.org/u/k4rtik)
#### Post date: [29 Abril , 2018 19:20 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/3 "2018-04-29T19:20:28Z")

</div>

Nope:

 ![15](https://global.discourse-cdn.com/meta/original/3X/9/2/920098e35278a8174a6921539ebcde4e6477bc17.png)

(turns out there were four that I deactivated, and I have no idea who)

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [29 Abril , 2018 21:18 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/4 "2018-04-29T21:18:51Z")

</div>

I can see the same thing here. The username showed under Subject last year (our last deactivated user showing was Feb '17) but not this year.

---

<div class="post-metadata">

### Author: ![k4rtik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/k4rtik/32/119508_2.png) [@k4rtik](https://meta.discourse.org/u/k4rtik)
#### Post date: [1 Maio , 2018 22:57 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/5 "2018-05-01T22:57:17Z")

</div>

So if this is a confirmed bug, can someone look at it? Do I need to file a bug report elsewhere?

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [2 Maio , 2018 00:24 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/6 "2018-05-02T00:24:02Z")

</div>

I’m not confirming that it’s a bug (it may have been deliberate), just that I can see the same thing here.

That said, I’ll recategorise so that we can get confirmation.

---

<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: [7 Maio , 2018 23:49 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/7 "2018-05-07T23:49:48Z")

</div>

Sure, @techapj if you can repro maybe a quick fix?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [8 Maio , 2018 02:56 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/9 "2018-05-08T02:56:56Z")

</div>

Deactivated user doesn’t show up (under subject) in logs if they are deleted. This is because we store target user ID in logs, and if that user gets deleted there is no associated account with that ID.

I added the location as context to deactivated user logs which contains user ID and username via:

[https://github.com/discourse/discourse/commit/3a6e137e70c0d57e977679b8a39494c17b1c469e](https://github.com/discourse/discourse/commit/3a6e137e70c0d57e977679b8a39494c17b1c469e)

This is how the “deactivate user” log will look now:

 ![24](https://global.discourse-cdn.com/meta/original/3X/e/9/e9a7bbfc40cf625e30320dd1126c19be71bb9ea5.png)

Note that this change will apply on all future deactivations.

---

<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: [8 Maio , 2018 03:54 UTC](https://meta.discourse.org/t/deactivated-by-staff-not-being-logged/86944/10 "2018-05-08T03:54:24Z")

</div>


