# Discourse deleting users

**URL:** https://meta.discourse.org/t/discourse-deleting-users/98686
**Category:** Support
**Created:** [October 4, 2018, 4:39am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686 "2018-10-04T04:39:33Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Henry\_Cooper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/henry_cooper/32/97503_2.png) [@Henry\_Cooper](https://meta.discourse.org/u/Henry_Cooper)
#### Post date: [October 4, 2018, 4:39am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/1 "2018-10-04T04:39:33Z")

</div>

I checked my logs and notices that users were being deleted because they were inactive.

Is there any way I can turn this setting off?  
The only reason i want to do this is because I export the emails of all my users and use it for email marketing my blogs.

Alternatively, if anyone knows a query which will let me get a list of all the deleted users and their emails, that would be extremely helpful!

Thanks in advance.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [October 4, 2018, 5:20am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/2 "2018-10-04T05:20:42Z")

</div>

Are those users who never activated their accounts?

There is a setting for them: `purge unactivated users grace period days`

_“Grace period (in days) before a user who has not activated their account is deleted. Set to 0 to never purge unactivated users.”_

---

<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: [October 4, 2018, 10:27am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/3 "2018-10-04T10:27:44Z")

</div>

Inactive users don’t have valid, confirmed emails, so your request makes no sense. I could sign up with `ronald.mcdonald@mcdonalds.com` and .. you’d send marketing email to that address?

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [October 4, 2018, 10:41am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/4 "2018-10-04T10:41:12Z")

</div>

What about inactive users which are created via sso? are those going to be deleted as well?

---

<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: [October 4, 2018, 10:45am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/5 "2018-10-04T10:45:00Z")

</div>

It’s not possible to generate inactive users via SSO. The parent site is authoritative, and vets the emails.

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [October 4, 2018, 10:46am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/6 "2018-10-04T10:46:12Z")

</div>

Then this

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/8/98333bb99c541cac3aa69dd8221c1f50723b3df0.png)  
is unrelated?

---

<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: [October 4, 2018, 10:52am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/7 "2018-10-04T10:52:35Z")

</div>

Are you asking me if you have created broken SSO? It’s possible, yes (especially if you indicate that the parent site has validated email, but in fact does not. This is _extraordinarily_ dangerous since any user can sign up as any email address in the system.). Should you create broken SSO? No.

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [October 4, 2018, 11:21am UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/8 "2018-10-04T11:21:13Z")

</div>

> [@codinghorror](#):
>
> if you have created broken SSO?

I will have to check that. Thanks for the hint tho 🙂

---

<div class="post-metadata">

### Author: ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)
#### Post date: [October 4, 2018, 7:35pm UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/9 "2018-10-04T19:35:39Z")

</div>

This may not always be the case at least when it comes to using [WP Discourse](https://github.com/discourse/wp-discourse) for SSO.

We’re using [WP Discourse](https://github.com/discourse/wp-discourse) + WooCommerce for subscription / membership signups, and I see in our logs we have many Discourse users being auto-deleted by system. We add new WP subscribers to a custom Discourse group using `add_user_to_discourse_group` in [WP Discourse](https://github.com/discourse/wp-discourse), which as I understand it creates the user, but inactive / pending email verification in Discourse.

Sounds like this can happen with WordPress whenever you’re using a signup flow that’s different from the WP default (for example with Woo or a membership plugin), and therefore still requires email validation on the Discourse end as mentioned here: [Auto activated accounts for WP Discourse SSO?](https://meta.discourse.org/t/auto-activated-accounts-for-wp-discourse-sso/90272)

In this case this behavior (auto-purge inactive users) seems okay, as it represents people who signed up on the WP site but never got around to using Discourse. Just thinking through this further…I assume when an inactive account is automatically purged, if that user comes back later they will still be able to activate a Discourse account with the same username? Hope that’s how it works anyway!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 3, 2018, 7:43pm UTC](https://meta.discourse.org/t/discourse-deleting-users/98686/10 "2018-11-03T19:43:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
