Code improvements
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user