The user list gets a switch "Mitglieder dürfen ihre Discord-Verknüpfung im Profil lösen" (users.edit, default on). Turned off, the profile shows a note instead of the button and discord_unlink.php refuses the request. The value lives in a new settings table, created automatically like the other schema additions (SCHEMA_VERSION 2). The user and group tables were wider than the 1100px content column, so the actions column (edit/delete/approve) scrolled out of view. Both pages now use the wide container and the actions column sticks to the right edge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
20 lines
580 B
PHP
20 lines
580 B
PHP
<?php
|
|
require_once __DIR__ . '/../includes/bootstrap.php';
|
|
require_permission('users.edit');
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
|
redirect('/admin/users.php');
|
|
}
|
|
verify_csrf();
|
|
|
|
$key = (string) ($_POST['setting'] ?? '');
|
|
if (!array_key_exists($key, SETTINGS_DEFAULTS)) {
|
|
set_flash('error', 'Unbekannte Einstellung.');
|
|
redirect('/admin/users.php');
|
|
}
|
|
|
|
// Bisher gibt es nur Ja/Nein-Einstellungen: angehakt = "1", sonst "0".
|
|
setting_set($key, isset($_POST['value']) ? '1' : '0');
|
|
|
|
set_flash('success', 'Einstellung gespeichert.');
|
|
redirect('/admin/users.php');
|