Skip to content

Commit

Permalink
More invitation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Oct 11, 2021
1 parent 7b001a6 commit 4cfb72d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/GroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ private function indexVariations($tab, $network)
$all_group_tags = GroupTags::all();
$networks = Network::all();

// Look for groups where user ID exists in pivot table. We have to explicitly test on deleted_at because
// Look for groups we have joined, not just been invited to. We have to explicitly test on deleted_at because
// the normal filtering out of soft deletes won't happen for joins.
$your_groups = Group::join('users_groups', 'users_groups.group', '=', 'groups.idgroups')
->leftJoin('events', 'events.group', '=', 'groups.idgroups')
->where('users_groups.user', $user->id)
->where('users_groups.status', 1)
->whereNull('users_groups.deleted_at')
->orderBy('groups.name', 'ASC')
->groupBy('groups.idgroups')
Expand Down

0 comments on commit 4cfb72d

Please sign in to comment.