diff --git a/administrator/components/com_config/forms/application.xml b/administrator/components/com_config/forms/application.xml index 8b3121127b842..62aea1a9bdfc4 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); } }