Automatic/Bulk deleting inactive users

Is there a way to delete inactive users? Lets say inactive means a user last seen 1 year ago, without any post.

2개의 좋아요

Hey there,

You can do it manually by heading to their profile, go to the persons’ admin panel, head all the way down until you find a Delete User.


Not sure about inactive users, but there are many topics to search for regarding the same question. I found this one:

https://meta.discourse.org/t/new-signups-who-never-validate-email-deleted-after-7-days/22736/5?u=thomas_g

I’m aware of how to delete a user manually. I was looking for kind of automatic or bulk way.

1개의 좋아요

I wouldn’t actually mind having this functionality built into Discourse, but it is not popular because it “decreases” user count metrics.

That seems like a fairly safe definition, except what if this user had a bunch of read time? I’d say you need to limit it to

  • last seen 1 year ago
  • no posts
  • user at TL0 (less than 15m total account read time)
8개의 좋아요

Absolutely. this is also a good limit for inactive user.

I don’t know how inactive users might increase any value to the forum. I mean who cares if we have a million of inactive users? :thinking:

5개의 좋아요

@nbianca can you add that to your list. Low pri.

3개의 좋아요

It’ll need to have a LONG default for safety. Like two years.

5개의 좋아요

Another advantage of having this ability is to free up short usernames that are taken by inactive users.

6개의 좋아요

I submitted a PR about this:

https://github.com/discourse/discourse/pull/7172

7개의 좋아요

Thats great :smiley: . where is the option to change the default 2 years limit? And btw can we also do a webhook call when a user is deleted?

3개의 좋아요

Oh yes there should be a site setting to adjust the time limit here @nbianca for sure. 2 years is still a good safe default of course.

6개의 좋아요

Is there a way to undo the delete?
This feature purged a bunch of users that we’d have preferred to have emailed out a reminder to first.

1개의 좋아요

No, unless no changes have occurred since your last backup.

It’s highly advisable to consult the release notes before applying any updates, and in addition I would strongly recommend you run all changes through a staging site before touching a live instance.

1개의 좋아요

This is complete thanks @nbianca!