From c9b183946003603df87a2d1a1a9b6883c04a18a1 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Thu, 6 Aug 2026 01:23:38 +0200 Subject: [PATCH] xddf --- src/App/AccountPages.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/App/AccountPages.php b/src/App/AccountPages.php index 7a34e9c..89baf44 100755 --- a/src/App/AccountPages.php +++ b/src/App/AccountPages.php @@ -727,10 +727,13 @@ final class AccountPages INNER JOIN events e ON e.id = ep.event_id INNER JOIN users u ON u.id = e.created_by LEFT JOIN user_profiles up ON up.user_id = u.id - WHERE ep.user_id = :id AND e.created_by <> :id AND e.starts_at >= NOW() + WHERE ep.user_id = :participantId AND e.created_by <> :ownerId AND e.starts_at >= NOW() ORDER BY e.starts_at ASC' ); - $stmt?->execute(['id' => $userId]); + $stmt?->execute([ + 'participantId' => $userId, + 'ownerId' => $userId, + ]); $eventsJoinedUpcoming = $stmt?->fetchAll(\PDO::FETCH_ASSOC) ?: []; $stmt = $pdo?->prepare( @@ -741,10 +744,13 @@ final class AccountPages INNER JOIN events e ON e.id = ep.event_id INNER JOIN users u ON u.id = e.created_by LEFT JOIN user_profiles up ON up.user_id = u.id - WHERE ep.user_id = :id AND e.created_by <> :id AND e.starts_at < NOW() + WHERE ep.user_id = :participantId AND e.created_by <> :ownerId AND e.starts_at < NOW() ORDER BY e.starts_at DESC' ); - $stmt?->execute(['id' => $userId]); + $stmt?->execute([ + 'participantId' => $userId, + 'ownerId' => $userId, + ]); $eventsJoinedPast = $stmt?->fetchAll(\PDO::FETCH_ASSOC) ?: []; if (isset($_GET['edit_event'])) {