Fix formatting and interfaces in nearly every file
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Interfaces\Controller;
|
||||
use App\Models\Enums\UserState;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class LoginController
|
||||
* @package App\Http\Controllers\Auth
|
||||
*/
|
||||
class LoginController extends Controller
|
||||
{
|
||||
use AuthenticatesUsers;
|
||||
@@ -44,17 +48,16 @@ class LoginController extends Controller
|
||||
$user->save();
|
||||
|
||||
// TODO: How to handle ON_LEAVE?
|
||||
if($user->state !== UserState::ACTIVE) {
|
||||
|
||||
Log::info('Trying to login '. $user->pilot_id .', state '
|
||||
. UserState::label($user->state));
|
||||
if ($user->state !== UserState::ACTIVE) {
|
||||
Log::info('Trying to login '.$user->pilot_id.', state '
|
||||
.UserState::label($user->state));
|
||||
|
||||
// Log them out
|
||||
$this->guard()->logout();
|
||||
$request->session()->invalidate();
|
||||
|
||||
// Redirect to one of the error pages
|
||||
if($user->state === UserState::PENDING) {
|
||||
if ($user->state === UserState::PENDING) {
|
||||
return view('auth.pending');
|
||||
} elseif ($user->state === UserState::REJECTED) {
|
||||
return view('auth.rejected');
|
||||
|
||||
Reference in New Issue
Block a user