[FEATURE] Refactor AdminPanel API to use composition
[Packages/TYPO3.CMS.git] / typo3 / sysext / adminpanel / Classes / Middleware / SqlLogging.php
index cb19610..720d7c8 100644 (file)
@@ -38,7 +38,7 @@ class SqlLogging implements MiddlewareInterface
      */
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
     {
-        if (StateUtility::isActivated() && StateUtility::isOpen()) {
+        if (StateUtility::isActivatedForUser() && StateUtility::isOpen()) {
             $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
             $connection = $connectionPool->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
             $connection->getConfiguration()->setSQLLogger(GeneralUtility::makeInstance(DoctrineSqlLogger::class));