[TYPO3-dev] Current pid not yet available while FE authentication?
Steffen Müller
typo3 at t3node.com
Thu Nov 22 20:33:32 CET 2012
Hi.
I am struggling with the following problem:
I use my own authentication service (added with
t3lib_extMgm::addService(), as subtype 'authUserFE, getUserFE').
Within my getUser() function I need to access some settings from
TypoScript. I have a multidomain environment where domain specific
settings are stored in TS.
Since TS is not yet available, I tried some routines from EXT:timtab [1]
to fetch TS. It requires a pid and fetches it from
$GLOBALS['TSFE']->id. But unfortunately, it is not yet set.
And I can't simply extract it from
t3lib_div::getIndpEnv('TYPO3_REQUEST_URL') because I use realurl.
How to get the current pid within authentication services?
[1]
$template = array();
$tsParser = t3lib_div::makeInstance('t3lib_tsparser_ext');
$tsParser->tt_track = 0;
$tsParser->init();
$sysPage = t3lib_div::makeInstance('t3lib_pageSelect');
$rootLine = $sysPage->getRootLine($GLOBALS['TSFE']->id);
$tsParser->runThroughTemplates($rootLine);
$tsParser->generateConfig();
$setup = $tsParser->setup['plugin.']['tx_atlantik.']['settings.'];
$constants =
$tsParser->setup_constants['plugin.']['tx_atlantik.']['settings.'];
if (is_array($setup) && is_array($constants)) {
$setup = t3lib_div::array_merge_recursive_overrule($setup, $constants, 1);
}
return $setup;
--
cheers,
Steffen
TYPO3 Blog: http://www.t3node.com/
Twitter: @t3node - http://twitter.com/t3node
More information about the TYPO3-dev
mailing list