JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[4.2] Allow to disable session metadata tracking for guest users #178

Closed joomlapl-bot closed 2 years ago

joomlapl-bot commented 2 years ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/37459 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/components/com_config/forms/application.xml b/administrator/components/com_config/forms/application.xml index 8b3121127b84..62aea1a9bdfc 100644 --- a/administrator/components/com_config/forms/application.xml +++ b/administrator/components/com_config/forms/application.xml @@ -952,6 +952,20 @@ + + + + +
config->get('session_metadata', true) && $event->getSession()->has('user')) + // Whether to track Session Metadata + if (!$this->config->get('session_metadata', true) || !$event->getSession()->has('user')) { - $this->metadataManager->createOrUpdateRecord($event->getSession(), $event->getSession()->get('user')); + return; } + + $user = $event->getSession()->get('user'); + + // Whether to track Session Metadata for Guest user + if (!$this->config->get('session_metadata_for_guest', true) && !$user->id) + { + return; + } + + $this->metadataManager->createOrUpdateRecord($event->getSession(), $user); } } ```