Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #11710
James Coleb152a2c8d9f6
diff --git a/app/Handlers/ExchangeRate/ConvertsAmountToPrimaryAmount.php b/app/Handlers/ExchangeRate/ConvertsAmountToPrimaryAmount.phpindex f1b695f63e..c5f8545a33 100644--- a/app/Handlers/ExchangeRate/ConvertsAmountToPrimaryAmount.php+++ b/app/Handlers/ExchangeRate/ConvertsAmountToPrimaryAmount.php@@ -36,13 +36,13 @@ class ConvertsAmountToPrimaryAmount$primaryAmountField = $params->primaryAmountField;if (!Amount::convertToPrimary($params->user)) {- Log::debug(sprintf(- 'User does not want to do conversion, no need to convert "%s" and store it in field "%s" for %s #%d.',- $params->amountField,- $params->primaryAmountField,- get_class($params->model),- $params->model->id- ));+// Log::debug(sprintf(+// 'User does not want to do conversion, no need to convert "%s" and store it in field "%s" for %s #%d.',+// $params->amountField,+// $params->primaryAmountField,+// get_class($params->model),+// $params->model->id+// ));$params->model->{$primaryAmountField} = null;$params->model->saveQuietly();diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.phpindex e4c39f6355..3566bf4bc3 100644--- a/app/Support/Authentication/RemoteUserGuard.php+++ b/app/Support/Authentication/RemoteUserGuard.php@@ -31,6 +31,7 @@ use Illuminate\Contracts\Auth\Authenticatable;use Illuminate\Contracts\Auth\Guard;use Illuminate\Contracts\Auth\UserProvider;use Illuminate\Contracts\Foundation\Application;+use Illuminate\Support\Facades\App;use Illuminate\Support\Facades\Log;/**@@ -58,6 +59,10 @@ class RemoteUserGuard implements Guard{$this->tried = true;Log::debug(sprintf('Now at %s', __METHOD__));+ if(App::runningInConsole()) {+ Log::debug('Running in console, will not authenticate.');+ return;+ }if ($this->user instanceof User) {Log::debug(sprintf('%s is found: #%d, "%s".', $this->user::class, $this->user->id, $this->user->email));@@ -150,6 +155,10 @@ class RemoteUserGuard implements Guardpublic function user(): ?User{+ if(App::runningInConsole()) {+ Log::debug('Running in console, will not authenticate.');+ return null;+ }if (false === $this->tried) {Log::debug('Have not tried authentication, do it now.');$this->authenticate();