Eliminate accounts without main user account

I’m sorry if this has been covered somewhere, I’m not really even sure what keywords are usable for this issue.

To explain, our Discourse forum is adjunct to another site. Any user on that site can go to the forum links and automatically have an account created with the same username and avatar as is on the main site.

The problem we have is, that if a user closes their main account, or has it closed for bad behavior, the forum account will remain open unless we close / delete / suspend it manually.

Is there any way that we can reverse search accounts to see if they have a main connected to them? Alternatively, is there a way to make a forum account auto-close when the main no longer exists?

Thanks (in advance) for any help and again I’m sorry if this was already covered and I missed it.

I assume that you are using SSO between the sites.

So when closing an account in the main site it can query the forum using a GET to /u/by-external/{external_id}.json to retrieve the forum account, and then use the user_id in the response to issue an subsequent request closing the forum account.

1 Like

I honestly don’t know how it was done, I’m just a forum admin, but thank you - I will pass this information on to the fellow who does that kind of thing.

1 Like