Find previously suspended users

AI-generated summary

In a Support category thread titled “Find previously suspended users,” jomaxro asks if it’s possible to retrieve a list of users who were ever suspended, even if no longer active. cpradio suggests using the Data Explorer plugin with a SQL query targeting user_histories where action = 10 (confirmed as suspension). However, jomaxro notes moderators lack query access. cpradio clarifies only admins can run such queries, though moderators could access results via a master API key. jomaxro adds that suspensions are now logged — though names weren’t previously stored — and links to a meta topic discussing this. codinghorror checks if the issue persists, and jomaxro confirms the original bug was fixed years ago. In post 10, jomaxro verifies suspensions are now fully logged in /admin/logs/staff_action_logs and downloadable CSVs, noting a separate bug to be reported in a new topic.

Is it possible to get a list of users who were suspended at one time or another (not neccessarily actively suspended)?

I think you can use this in the data explorer plugin

SELECT * FROM user_histories
  WHERE action = 10

I’m validating that 10 is suspended, but I believe it is.

And I found it is

OK, can it be done by a Moderator? To the best of my knowledge mods don’t have access to run queries.

No, it can’t. But if you give it to your Admin, they can create the query, and you could use a master API key to access the queried data

Thanks @cpradio, this is less of an issue after I discovered that suspensions are logged…but no names are stored in logs. I would rather see a fix to that then need to bother the admins:

Is that still the case @jomaxro?

I doubt it. That was 3 years ago, and the linked bug was fixed/closed. Will check to be sure.

Suspensions are definitely logged now, checked both /admin/logs/staff_action_logs and the downloaded CSV. Found a separate bug, but I’ll open a new topic for that.