dsfdsf
All checks were successful
Deploy / deploy (push) Successful in 59s

This commit is contained in:
2026-07-31 21:33:04 +02:00
parent 92442a57c7
commit 002108ac83
10 changed files with 348 additions and 35 deletions

View File

@@ -10,12 +10,16 @@ $app = app();
$pdo = $app->pdo();
$users = [];
$error = '';
$emailStore = null;
try {
if (!$pdo) {
throw new RuntimeException('Keine Datenbankverbindung verfügbar.');
}
$emailStore = new App\UserEmailStore($pdo);
$emailStore->ensureSchema();
$hasRolesTable = false;
try {
$stmt = $pdo->query("SELECT 1 FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'user_roles' LIMIT 1");
@@ -36,6 +40,7 @@ try {
';
$stmt = $pdo->query($sql);
$users = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
$users = $emailStore->decryptRowEmails($users);
if ($hasRolesTable && $users) {
$roleStmt = $pdo->query('SELECT user_id, role FROM user_roles ORDER BY user_id ASC, role ASC');