Skip to content
Snippets Groups Projects
Commit 3a0fb48a authored by Tibo's avatar Tibo
Browse files

redirect to organization

parent a868a694
No related branches found
No related tags found
No related merge requests found
Pipeline #12760 passed
......@@ -53,12 +53,12 @@ class OrganizationUserController extends Controller
if ($user->ownsOrganization($organization)) {
// user is already part of organization...
return redirect(route("dashboard"));
return redirect(action("OrganizationController@show", ["organization" => $organization]));
}
Mail::to($user->email)->send(new OrganizationUserInvitation($organization, $user));
$organization->users()->attach($user->id);
return redirect(route("dashboard"));
return redirect(action("OrganizationController@show", ["organization" => $organization]));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment