1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Fixes for locale middleware

This commit is contained in:
David Bomba 2022-01-16 19:09:46 +11:00
parent 88c6fc6d4c
commit bee623af75

View File

@ -35,7 +35,13 @@ class Locale
} elseif (auth('contact')->user()) {
App::setLocale(auth('contact')->user()->client->locale());
} elseif (auth()->user()) {
App::setLocale(auth()->user()->company()->getLocale());
try{
App::setLocale(auth()->user()->company()->getLocale());
}
catch(\Exception $e){
}
} else {
App::setLocale(config('ninja.i18n.locale'));
}