From a8398965b8c11ae86199579c26907cf19f464c21 Mon Sep 17 00:00:00 2001 From: Yurii Date: Wed, 25 Feb 2026 12:56:40 +0200 Subject: [PATCH] fix loging data not available on logout --- application/Espo/Controllers/Settings.php | 9 +------- .../Espo/Tools/App/SettingsService.php | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/application/Espo/Controllers/Settings.php b/application/Espo/Controllers/Settings.php index 72a063a22f..61e9df161e 100644 --- a/application/Espo/Controllers/Settings.php +++ b/application/Espo/Controllers/Settings.php @@ -70,13 +70,6 @@ class Settings private function getConfigData(): stdClass { - $data = $this->service->getConfigData(); - $metadataData = $this->service->getMetadataConfigData(); - - foreach (get_object_vars($metadataData) as $key => $value) { - $data->$key = $value; - } - - return $data; + return $this->service->getConfigData(); } } diff --git a/application/Espo/Tools/App/SettingsService.php b/application/Espo/Tools/App/SettingsService.php index 2d49ae84a0..8ee0fd54d0 100644 --- a/application/Espo/Tools/App/SettingsService.php +++ b/application/Espo/Tools/App/SettingsService.php @@ -56,6 +56,15 @@ use stdClass; class SettingsService { + /** + * @var string[] + * @todo Do not use when these parameters moved away from the settings. + */ + private array $ignoreUpdateParamList = [ + 'loginView', + 'loginData', + ]; + public function __construct( private ApplicationState $applicationState, private Config $config, @@ -87,11 +96,22 @@ class SettingsService $this->filterData($data); $this->loadAdditionalParams($data); + /** @noinspection PhpDeprecationInspection */ + $metadataData = $this->getMetadataConfigData(); + + foreach (get_object_vars($metadataData) as $key => $value) { + $data->$key = $value; + } + return $data; } /** * Get metadata to be used in config. + * + * @todo Make private in v9.4.0. + * @todo Move away from settings. Use some different approach. + * @deprecated Since v9.3.2. */ public function getMetadataConfigData(): stdClass { @@ -208,6 +228,7 @@ class SettingsService } $ignoreItemList = array_merge( + $this->ignoreUpdateParamList, $this->access->getSystemParamList(), $this->access->getReadOnlyParamList(), $this->isRestrictedMode() && !$user->isSuperAdmin() ?