Every "oe/ae/ue" spelling throughout the UI text and comments (fuer, loeschen, koennen, ...) was my own typo, not an encoding bug - the charset fix in the last commit was unrelated. Replaced all of them with proper ö/ä/ü across every PHP file and the README. Also fix table rows rendering inconsistently: `.actions` and the status badges were applying `display:flex` directly to a <td>, which fights the table layout model and renders unreliably across browsers. Moved the flex layout into a wrapper <div> inside each cell instead, and restyled row-level delete buttons as plain text links so they match the height of the "Bearbeiten" link exactly. Tables also get a horizontal-scroll wrapper so narrow viewports scroll instead of squeezing cell content. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
23 lines
574 B
PHP
23 lines
574 B
PHP
<?php
|
|
require_once __DIR__ . '/../includes/bootstrap.php';
|
|
require_permission('users.delete');
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
|
redirect('/admin/users.php');
|
|
}
|
|
|
|
verify_csrf();
|
|
|
|
$id = (int) ($_POST['id'] ?? 0);
|
|
$currentUser = current_user();
|
|
|
|
if ($id === (int) $currentUser['id']) {
|
|
set_flash('error', 'Du kannst deinen eigenen Account nicht löschen.');
|
|
redirect('/admin/users.php');
|
|
}
|
|
|
|
$stmt = db()->prepare('DELETE FROM users WHERE id = ?');
|
|
$stmt->execute([$id]);
|
|
|
|
set_flash('success', 'Benutzer wurde gelöscht.');
|
|
redirect('/admin/users.php');
|