mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Removed the use of Auth facade and removed unnecesary option
This commit is contained in:
@@ -48,11 +48,7 @@ class LanguageMiddleware
|
||||
*/
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
if (! Auth::check() || $this->config->get('pterodactyl.lang.global')) {
|
||||
$this->app->setLocale($this->config->get('app.locale', 'en'));
|
||||
} else {
|
||||
$this->app->setLocale(Auth::user()->language);
|
||||
}
|
||||
$this->app->setLocale($request->user()->language ?? $this->config->get('app.locale'));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user