mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fix login/logout in jobs
This commit is contained in:
parent
d6607e0165
commit
a5e22746fe
@ -54,8 +54,10 @@ class ImportData extends Job implements ShouldQueue
|
||||
{
|
||||
$includeSettings = false;
|
||||
|
||||
Auth::onceUsingId($this->user->id);
|
||||
$this->user->account->loadLocalizationSettings();
|
||||
if (App::runningInConsole()) {
|
||||
Auth::onceUsingId($this->user->id);
|
||||
$this->user->account->loadLocalizationSettings();
|
||||
}
|
||||
|
||||
if ($this->type === IMPORT_JSON) {
|
||||
$includeData = $this->settings['include_data'];
|
||||
@ -77,6 +79,8 @@ class ImportData extends Job implements ShouldQueue
|
||||
$message = $importService->presentResults($results, $includeSettings);
|
||||
$userMailer->sendMessage($this->user, $subject, $message);
|
||||
|
||||
Auth::logout();
|
||||
if (App::runningInConsole()) {
|
||||
Auth::logout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user