Add REMOTE_USER auth

This commit is contained in:
Chris 2019-06-19 11:32:41 +01:00
parent 5f524563cf
commit 1410c41f48

View file

@ -82,6 +82,10 @@ class AppServiceProvider extends ServiceProvider
session(['current_user' => $user]);
}
}
elseif(isset($_SERVER['REMOTE_USER']) && !empty($_SERVER['REMOTE_USER'])) {
$user = User::where('username', $_SERVER['REMOTE_USER'])->first();
\Auth::loginUsingId($user->id);
}
}