- account_anonymize() first calls the bot's new POST /api/privacy/anonymize (account_deletion_bot()):
- Running raid sign-ups and premade memberships are removed; a premade the member leads keeps going
without a lead.
- Archived raids, activity checks, own reports and created events keep the account number instead of the
Discord ID. Reports about the member stay and expire after 10 days as before.
- If the bot is unreachable, the job goes into the setting account_deletion_bot_queue and is retried on every
run (not in the same run, read straight from the DB because setting_get() caches per request); after a
week there is a warning in the log. The deletion log says whether the bot part is done or pending.
- Due deletions now run in a shutdown function after the response (session closed, fastcgi_finish_request),
like admin_log_flush, so no visitor waits for the bot.
- Privacy policy, admin page and README describe the bot part.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
2.1 KiB
PHP
57 lines
2.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', '0');
|
|
|
|
// Manche Hoster liefern per Default einen abweichenden Zeichensatz im
|
|
// Content-Type-Header aus, der die <meta charset>-Angabe im HTML überstimmt
|
|
// und dann Umlaute (oe/ae/ue) kaputt macht. Deshalb hier explizit erzwingen.
|
|
ini_set('default_charset', 'UTF-8');
|
|
mb_internal_encoding('UTF-8');
|
|
|
|
// Alle Zeiten in deutscher Zeit. Der Bot rechnet Raid- und Event-Zeiten ebenfalls als deutsche
|
|
// Zeit um. Ohne diese Zeile nimmt PHP die Zeitzone des Hosters (oft UTC) - dann erscheint ein
|
|
// Raid um 9 Uhr auf der Website als 7 Uhr (Sommerzeit), und beim naechsten Bearbeiten wuerde
|
|
// er sogar auf 7 Uhr verschoben.
|
|
date_default_timezone_set('Europe/Berlin');
|
|
header('Content-Type: text/html; charset=UTF-8');
|
|
|
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
|
session_set_cookie_params([
|
|
'httponly' => true,
|
|
'samesite' => 'Lax',
|
|
]);
|
|
session_start();
|
|
}
|
|
|
|
require_once __DIR__ . '/db.php';
|
|
require_once __DIR__ . '/functions.php';
|
|
require_once __DIR__ . '/map_links.php';
|
|
require_once __DIR__ . '/member_picker.php';
|
|
require_once __DIR__ . '/auth.php';
|
|
require_once __DIR__ . '/permissions.php';
|
|
require_once __DIR__ . '/schema.php';
|
|
require_once __DIR__ . '/settings.php';
|
|
require_once __DIR__ . '/admin_log.php';
|
|
require_once __DIR__ . '/security.php';
|
|
require_once __DIR__ . '/moderation.php';
|
|
require_once __DIR__ . '/patchnotes.php';
|
|
require_once __DIR__ . '/legal.php';
|
|
require_once __DIR__ . '/account_deletion.php';
|
|
require_once __DIR__ . '/site_notice.php';
|
|
|
|
ensure_schema();
|
|
|
|
// Beantragte Kontoloeschungen, deren Frist abgelaufen ist, ausfuehren - hoechstens alle 15 Minuten
|
|
// und erst nach der Antwort an den Browser (includes/account_deletion.php)
|
|
account_deletion_schedule_run();
|
|
|
|
// Sitzung abgelaufen, aber "angemeldet bleiben"-Cookie da: wieder anmelden (includes/auth.php)
|
|
auth_remember_restore();
|
|
|
|
// Tempolimit fuer abgeschickte Formulare (Spam-/Missbrauchsschutz, siehe includes/security.php)
|
|
security_guard_post();
|
|
|
|
// Wartungsmodus: alle ohne site.maintenance sehen nur die Wartungsseite (includes/site_notice.php)
|
|
maintenance_gate();
|