Skip to content

Commit dc21ac8

Browse files
committed
Switch organization after accepting invitation
1 parent 4de7868 commit dc21ac8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Service/MemberService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public function addMember(User $user, Organization $organization, Role $role, bo
4545
$member->organization()->associate($organization);
4646
$member->role = $role->value;
4747
$member->save();
48+
49+
$user->currentOrganization()->associate($organization);
50+
$user->save();
4851
});
4952

5053
if (! $asSuperAdmin) {

0 commit comments

Comments
 (0)