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:
parent
88c6fc6d4c
commit
bee623af75
@ -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'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user