Removing ALL email notifications for a user that has left

My users are using SSO in order to log in. Sometimes they leave and I want to make sure that they don’t receive any more forum notifications on topics or categories they have subscribed to. How can I ensure that via API? Do I have to anonymise their posts or is there a less drastic setting which merely stops the emails and maybe displays them as “inactive”?

1 Like

The options that I can think of, from least to most drastic are:

  • update a user’s email preferences by setting ‘Send me an email when someone messages me’ and ‘Send me an email when someone quotes me, replies to my post, mentions my @username, or invites me to a topic’ to “Never”
  • suspend the user
  • anonymize the user

Any of these options could be performed through the Discourse API.

Suspending users might be the closest to what you are looking for. A suspended user’s usercard will look something like this, the message that is displayed is supplied by you when you suspend the user:


Site staff can still message suspended users, but suspended users cannot log into the site, and will not receive email notifications unless the notification is sent to them from a staff member.


Thank you!

Just to confirm: if we use the first option, Discourse will still send notifications for the topics and categories the user is Watching, right? Just not for private messages?

I think the second option is better for our purposes anyway.

Thanks for the quick help!

1 Like

When the user preference that is set with the “Send me an email when someone quotes me, replies to my post, mentions my @username, or invites me to a topic” dropdown is set to “never”, it disables sending emails about activity related to regular topics. This means that users will not be sent email notifications for topics that they are watching. The copy that is used for this setting should be updated to make that clear.