Tough the hook was part of the module class, it caused an exception because $GLOBALS['BE_USER'] was not available.
The exception was thrown because TYPO3\CMS\Adminpanel\Modules\AbstractModule uses $GLOBALS['BE_USER'] in its __constructor. The initialization of $GLOBALS['BE_USER'] has been changed and moved after the initialization of $GLOBALS['TSFE'].
This patch extracts the hook so the module does not need to be initialized that early.
Tough the hook was part of the module class, it caused an exception because
$GLOBALS['BE_USER']
was not available.The exception was thrown because
TYPO3\CMS\Adminpanel\Modules\AbstractModule
uses$GLOBALS['BE_USER']
in its__constructor
. The initialization of$GLOBALS['BE_USER']
has been changed and moved after the initialization of$GLOBALS['TSFE']
.This patch extracts the hook so the module does not need to be initialized that early.