@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public function showLoginForm(Request $request) |
| 26 | 26 | { |
| 27 | - if($request->session()->has('should_attach_to_organization')) { |
|
| 27 | + if ($request->session()->has('should_attach_to_organization')) { |
|
| 28 | 28 | session()->reflash(); |
| 29 | 29 | } |
| 30 | - if($request->has('wiki_callback')){ |
|
| 30 | + if ($request->has('wiki_callback')) { |
|
| 31 | 31 | session()->flash('wiki_callback', $request->input('wiki_callback')); |
| 32 | 32 | session()->flash('wiki_token', $request->input('wiki_token')); |
| 33 | 33 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function logout(Request $request) |
| 38 | 38 | { |
| 39 | - if($request->session()->has('should_attach_to_organization')) { |
|
| 39 | + if ($request->session()->has('should_attach_to_organization')) { |
|
| 40 | 40 | $shouldAttach = $request->session()->get('should_attach_to_organization'); |
| 41 | 41 | $shouldAttachToken = $request->session()->get('should_attach_to_organization_token'); |
| 42 | 42 | $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect'); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $request->session()->regenerateToken(); |
| 50 | 50 | |
| 51 | - if(isset($shouldAttach)){ |
|
| 51 | + if (isset($shouldAttach)) { |
|
| 52 | 52 | $request->session()->flash('should_attach_to_organization', $shouldAttach); |
| 53 | 53 | $request->session()->flash('should_attach_to_organization_token', $shouldAttachToken); |
| 54 | 54 | $request->session()->flash('should_attach_to_organization_redirect', $linkToRedirect); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | protected function loggedOut(Request $request) |
| 67 | 67 | { |
| 68 | 68 | $request->session()->reflash(); |
| 69 | - if($request->session()->has('should_attach_to_organization')){ |
|
| 69 | + if ($request->session()->has('should_attach_to_organization')) { |
|
| 70 | 70 | $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect'); |
| 71 | 71 | return $request->wantsJson() |
| 72 | 72 | ? new Response('', 204) |
@@ -76,17 +76,17 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | protected function authenticated(Request $request, $user) |
| 78 | 78 | { |
| 79 | - if($user->context_id === null){ |
|
| 79 | + if ($user->context_id === null) { |
|
| 80 | 80 | return redirect()->route('wizard.profile'); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if($request->session()->has('wiki_callback')){ |
|
| 83 | + if ($request->session()->has('wiki_callback')) { |
|
| 84 | 84 | $user->wiki_token = $request->session()->get('wiki_token'); |
| 85 | 85 | $user->save(); |
| 86 | 86 | $callback = urldecode($request->session()->get('wiki_callback')); |
| 87 | 87 | return redirect($callback); |
| 88 | 88 | } |
| 89 | - if($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null){ |
|
| 89 | + if ($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null) { |
|
| 90 | 90 | $token = $request->session()->get('should_attach_to_organization_token'); |
| 91 | 91 | $link = route('organization.invite.show').'?&token='.$token; |
| 92 | 92 | return $request->wantsJson() |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | public function redirectToProvider(string $provider) |
| 100 | 100 | { |
| 101 | - if($provider === 'twitter'){ |
|
| 101 | + if ($provider === 'twitter') { |
|
| 102 | 102 | config(['services.'.$provider.'.redirect' => env(strtoupper($provider).'_CALLBACK_LOGIN')]); |
| 103 | 103 | return Socialite::driver($provider)->redirect(); |
| 104 | 104 | } |