Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function accept(Request $request) |
||
27 | { |
||
28 | $invitation = Invitation::findByToken($request->token); |
||
29 | |||
30 | app(AcceptInvite::class)->handle($invitation); |
||
|
|||
31 | |||
32 | // Log user into the system and proceed to start page |
||
33 | auth()->guard('chief')->login($invitation->invitee); |
||
34 | |||
35 | if (is_null($invitation->invitee->password)) { |
||
36 | return redirect()->route('chief.back.password.edit'); |
||
37 | } |
||
38 | |||
39 | return redirect()->route('chief.back.dashboard.getting-started'); |
||
40 | } |
||
54 |