Move assignment of '__userAuthConfig'
authorMarcel Werk <burntime@woltlab.com>
Wed, 27 Mar 2024 16:26:39 +0000 (17:26 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 27 Mar 2024 16:26:39 +0000 (17:26 +0100)
The assignment must be made at a later point in the lifecycle, as otherwise it is not possible to change the configuration via an event.

wcfsetup/install/files/lib/system/WCF.class.php

index 74ba39feb920672502233d4cabfcc7c919273001..80af560696a1bd8561b635592df6f2f136bb4857 100644 (file)
@@ -198,6 +198,10 @@ class WCF
 
         $this->runBootstrappers();
 
+        self::getTPL()->assign([
+            '__userAuthConfig' => \wcf\system\user\authentication\configuration\UserAuthenticationConfigurationFactory::getInstance()->getConfigration(),
+        ]);
+
         EventHandler::getInstance()->fireAction($this, 'initialized');
     }
 
@@ -747,7 +751,6 @@ class WCF
         self::getTPL()->registerPrefilter(['event', 'hascontent', 'lang', 'jsphrase', 'jslang', 'csrfToken', 'icon']);
         self::getTPL()->assign([
             '__wcf' => $wcf,
-            '__userAuthConfig' => \wcf\system\user\authentication\configuration\UserAuthenticationConfigurationFactory::getInstance()->getConfigration(),
         ]);
 
         $isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest');