diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 176d44ac..dbbd7fd6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -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); + } }