Das Popup zeigt Prozent (Ring), geprueft/gesamt, das aktuelle Konto und Zaehler fuer geaendert,
unveraendert, nicht pruefbar und Fehler, am Ende eine Liste der Aenderungen und Fehler. Fehler
werden bis zu zweimal wiederholt und brechen den Lauf nicht ab; Abbrechen und Schliessen fragen
nach. Die Schritte zaehlen im eigenen Topf discord_admin statt post. Ohne JavaScript bleibt der
bisherige Abgleich in einer Anfrage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reported: the manual Discord sync said "Discord war gerade nicht erreichbar". Since the Consilium has its own server,
every sync asks Discord twice in a row (legion and Consilium server), and setting up linked groups triggers extra
syncs - most likely Discord answered 429.
- discord_fetch_member(): on 429 wait retry_after (up to 5 s) and try once more; if Discord still refuses, a clear
message ("Discord bremst gerade zu viele Abfragen - in N Sekunden noch einmal versuchen").
- discord_live_check() remembers the reason (discord_last_error(), only own messages, no database errors) and writes
it to the error log; the manual sync in the user form and in the profile show it instead of "nicht erreichbar".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Asked for: "wenn ein mitglied die legion verlässt, soll das benutzerprofil deaktiviert werden" - decided: leaving the
Discord server (also kick or ban) counts as leaving the legion; a returning member goes back to "Wartet auf
Freischaltung".
- includes/discord_auth.php: discord_member_left() disables active/pending accounts (status disabled, users.left_server_at,
session_epoch + 1, Discord groups removed, log entry "Automatisch (...)"); developers stay untouched.
discord_member_returned() puts such accounts back to pending (left_server_at cleared); accounts disabled by hand
stay locked. discord_live_check() calls both, so the session check and "Jetzt mit Discord abgleichen" deactivate too.
- bot_api.php for the new bot cog (cogs/legion_members.py): member_left, member_joined, legion_accounts (Discord IDs of
active/pending accounts) and legion_sync (the ones the bot misses on the server). Other guilds are ignored; a sync
that would disable more than half of the accounts is refused with a warning in the log (at most once a day).
- discord_callback.php: a Discord login of a returned member puts the account back to pending instead of "gesperrt".
- includes/auth.php: logout message says the account was deactivated.
- Admin: users list shows "Discord verlassen am ...", the user form a hint; setting the status by hand clears the mark.
- Schema version 67 (users.left_server_at); account deletion clears it.
- Privacy page (automatic deactivation, bot sync), patch note, README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Besides the automatic check every five minutes during a session, the user
list gets "Jetzt mit Discord abgleichen" (all linked accounts, logged in or
not) and the user form "Jetzt abgleichen" (one account), both for users.edit.
They run the same check with the stored token, just without waiting for the
interval, and report how many accounts were synced, left the server, have an
expired Discord login, never logged in via Discord, or could not be reached.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>