Check if user is logged in
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 12 Feb 2024 08:57:33 +0000 (09:57 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 12 Feb 2024 08:57:33 +0000 (09:57 +0100)
com.woltlab.wcf/templates/headIncludeJavaScript.tpl

index a5bbcfc5bd981da6d235c2a2a1c0867039d09f4d..c6bcae5d92dd69fcf86aa2922a1a5d05bad04e59 100644 (file)
@@ -75,7 +75,7 @@ window.addEventListener('pageshow', function(event) {
                                url: '{link controller="BackgroundQueuePerform"}{/link}',
                                force: {if $forceBackgroundQueuePerform|isset}true{else}false{/if}
                        },
-                       {if !SERVICE_WORKER_PUBLIC_KEY|empty}
+                       {if $__wcf->user->userID && !SERVICE_WORKER_PUBLIC_KEY|empty}
             serviceWorker: {
                 publicKey: '{@SERVICE_WORKER_PUBLIC_KEY|encodeJS}',
                 serviceWorkerJsUrl: '{$__wcf->getPath('wcf')}js/serviceWorker.js?v={@LAST_UPDATE_TIME}',