diff --git a/src/App/AccountPages.php b/src/App/AccountPages.php index 802baef..7a34e9c 100755 --- a/src/App/AccountPages.php +++ b/src/App/AccountPages.php @@ -722,10 +722,11 @@ final class AccountPages $stmt = $pdo?->prepare( 'SELECT e.id, e.title, e.teaser_public, e.image_path, e.starts_at, e.city, e.visibility, e.status, ep.status AS participation_status, - u.display_name AS host_name + COALESCE(up.display_name, "Mitglied") AS host_name FROM event_participants ep 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() ORDER BY e.starts_at ASC' ); @@ -735,10 +736,11 @@ final class AccountPages $stmt = $pdo?->prepare( 'SELECT e.id, e.title, e.teaser_public, e.image_path, e.starts_at, e.city, e.visibility, e.status, ep.status AS participation_status, - u.display_name AS host_name + COALESCE(up.display_name, "Mitglied") AS host_name FROM event_participants ep 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() ORDER BY e.starts_at DESC' );