[TYPO3-english] Session data
Dmitry Dulepov
dmitry.dulepov at gmail.com
Wed Mar 30 11:39:52 CEST 2011
Hi!
Tomiţă MILITARU wrote:
> I'm using extension sr_feuser_register with TYPO3 4.2.10 and I want to save
> some data in a session to have it available on other pages. My approach was:
> $sessionData['key'] = value
>
> $GLOBALS['TSFE']->fe_user->setKey('ses', 'sr_feuser_register',
> $sessionData);
> $GLOBALS['TSFE']->fe_user->storeSessionData();
>
> But when I want to retrive the date on another page:
> $sessionData =
> $GLOBALS['TSFE']->fe_user->getKey('ses','sr_feuser_register');
>
> The array $sessionData is empty. Do I miss something?
Is the user logged in? storeSessionData() stores data only if the user is
logged in. No user – no session data.
--
Dmitry Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/
More information about the TYPO3-english
mailing list