auth->guard($guard)->check()) { $this->auth->shouldUse($guard); // We now have an authenticated user so we override the locale already set // by the SetLanguage global middleware $lang = $this->auth->guard()->user()->preferences['lang']; if (in_array($lang, config('2fauth.locales')) && ! App::isLocale($lang)) { App::setLocale($lang); } return; } } $this->unauthenticated($request, $guards); } }