Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
39 | public function handle($request, Closure $next) |
||
40 | { |
||
41 | if ($this->authService->check() && !$this->authService->user()->canLogin()) { |
||
42 | $this->authService->logout(); |
||
43 | |||
44 | return redirect('auth/login') |
||
45 | ->with(['error' => 'Your account is disabled']); |
||
46 | } |
||
47 | |||
48 | return $next($request); |
||
49 | } |
||
50 | } |
||
51 |