Staged users disappearing?

Is it possible that staged users are deleted automatically after a while, if they don’t reply? This seems to have happened on my site with a handful of staged users from over a month ago - maybe 15 of them. I have been using staged users as part of my effort to use discourse as a ticket system, but now I am finding that the people I was writing to are gone and the messages are just to myself and there is no sign of the staged user, in the message or in the user list. I can confirm in mandrill that the email notifications were sent to the email address of the staged user.

Any insights much appreciated. :seedling:

Yes, we’ll automatically remove any staged users created more than 1 year ago and who have never posted.

You should see them in the staff action logs (“delete user” action).


Thanks, Regis! Is there an admin setting to disable this feature? I’d like to not delete them automatically. If there is none (and I couldn’t find one) could you contemplate adding it?

When they are deleted, is any shadow of a trace left behind, for example in any messages they have been in? It’s really weird to me to see messages I have written to people who are no longer in the message. Now it looks like I am schizophrenic, talking to myself and giving myself all kinds of interesting names. :wink:

Also, I think something went wrong in this case because these staged users I am talking about were created more recently, like in the last few weeks and months. None of them were created more than 1 year ago.

1 Like

I could add a setting.

They’re deleted as if you clicked the Delete User button in the user admin page so standard deletion rules apply.

The code looks good to me. Would :heart: to get more info or (even better) reproduction steps :wink:

1 Like

Please do add a setting when you get a chance - this is really causing me problems. I don’t know how to replicate, but I can see that starting 27 days ago, discourse has been deleting staged users and I’m now up to 24 users deleted. Here are some examples deleted today - I replaced usernames with **DELETED**. They all seem to be 14 days old when they are deleted.

id: 4912
username: **DELETED**
name: **DELETED**
created_at: 2018-04-30 03:39:26 UTC
trust_level: 0
last_emailed_at: 2018-05-10 11:40:53 UTC

id: 4911
username: **DELETED**
name: **DELETED**
created_at: 2018-04-30 03:31:20 UTC
trust_level: 0
last_emailed_at: 2018-04-30 03:41:28 UTC

Could it be I am running afoul of the “purge unactivated users grace period days” setting? It was set to 14 days, and I have now set it to zero.

Most definitely. That setting controls a purge of all inactive users.


*phew* that’s great to learn. Seems to me though that staged users should be excluded from that setting.

I’m pretty sure these are completely unrelated things.

Yeah, so that has been running against staged users this whole time, but it hasn’t been catching any of them because in every other usage of staged users, all the ones that are cared about have at least one post (the initial e-mail)!

The setting has been deleting things like, “someone adds a CC to a staged-user-based support PM, they get invited, never say anything” -> :wastebasket:


LOL, go figure! :smiley_cat:

1 Like

thanks, all. the explanation makes good sense to me.

so where am I at with this? is disabling the 14 day purge of unactivated users going to fix my problem?

will you change it so in future staged users are not deleted by the 14 day purge?

Possibly, what are your thoughts on this @sam?

The trivial fix here is to look at topic_allowed_users before doing the great 14 day purge… cause the users have records there and should be left alone. Marking this as a bug… already assigned to @zogstrip who can sort it out.


@tobiaseigen it’s now fixed :cherries:


This topic was automatically closed after 23 hours. New replies are no longer allowed.

@codinghorror recently noticed that old inactive users were not getting purged. Turns out this was because the inactive users had a welcome message from discobot which prevented them from getting purged.

We will now purge inactive users even if they have a message from non-human users (system, discobot) as per: