Code improvements

This commit is contained in:
2026-09-04 09:27:48 +02:00
parent d23e6c3914
commit 4bb64b0053
51 changed files with 30702 additions and 87 deletions
@@ -297,7 +297,7 @@ class EventParticipantRepository {
public function getMyParticipations(?int $maxEvents = null) : array {
$participations = [];
$user = auth()->user();
$user = currentUser();
if ($user === null) {
return $participations;
}
@@ -326,13 +326,13 @@ class EventParticipantRepository {
}
public function getMyParticipationByIdentifier(string $identifier) : ?EventParticipant {
$user = auth()->user();
$user = currentUser();
if ($user === null) {
return null;
}
return EventParticipant::where('identifier', $identifier)
->where('tenant', app('tenant')->slug)
->where('tenant', currentTenant()->slug)
->where('user_id', $user->id)
->whereNull('unregistered_at')
->first();