SSO, anciens comptes désactivés

Le serveur hébergeant notre instance Discourse a planté de manière catastrophique, et nous ne disposons que d’une sauvegarde assez ancienne de Discourse.
L’instance, que nous avons restaurée, utilise l’authentification unique (SSO) avec Drupal.

Question : entre la date de la dernière sauvegarde et aujourd’hui, plusieurs utilisateurs ont été désactivés dans Drupal et ne devraient donc plus pouvoir se reconnecter à Discourse (je suppose).
Mais qu’en est-il des notifications par e-mail ? On nous a déjà signalé que certains anciens utilisateurs ont reçu des notifications. Existe-t-il un moyen de faire comprendre automatiquement à Discourse quels utilisateurs ne devraient plus en recevoir ? J’aimerais vraiment éviter de parcourir manuellement la liste des utilisateurs :slight_smile:

You could have Drupal use the API to deactivate those users. Or generate a list and deactivate them from the rails console.

Sounds good. Any pointers on how to do that?

To find the API calls you can see How to reverse engineer the Discourse API. Also, the topics on SSO should provide some info on how to have SSO master disable accounts. For you, though, the accounts are already disabled, so you’ll probably want to get a list of them . . . somehow . . . and then something like

 Users.where(somehow get the users).update_all(active: false)

(That’s not exactly right, but that’s the idea.)

If it’s an emergency and you have a budget, my contact info is in my profile.

Thank you, but I was asking mostly if there is a standard SSO thingy/process/endpoint/call to handle these kind of things (sync active users).

Apparently not :slight_smile:

Will try and cook my own.

1 « J'aime »

There is. You can probably find it in the wp-discourse plugin, but the easiest way to find it is to deactivate an account with the developer tools open and see what call it makes.