[TYPO3-dev] Proper usage of session storage
Steffen Kamper
info at sk-typo3.de
Thu Dec 18 01:33:11 CET 2008
Hi Francois,
after setKey you should use
$GLOBALS["TSFE"]->fe_user->storeSessionData();
Also you should differ fe_user and anonymous user:
Session data type; Either "user" (persistent, bound to fe_users profile)
or "ses" (temporary, bound to current session cookie)
vg Steffen
Francois Suter schrieb:
> Hi all,
>
> I have a question about the proper usage of TYPO3's session storage
> mechanism. Let's say I do a call like:
>
> $GLOBALS['TSFE']->fe_user->setKey('ses', $key, $stuff);
>
> to store some stuff in the session, and then retrieve it using:
>
> $GLOBALS['TSFE']->fe_user->getKey('ses', $key);
>
> I can't get this to work when there's no FE user logged in.
>
> The weird thing is that the storage seems to work. As soon as I log in
> as a FE user, whatever was stored before I logged in is suddenly
> available. Could it be that the session data is not properly initialised
> when no FE user is logged in?
>
> I will dig deeper into this, but I thought I would ask first in case
> someone has encountered the same problem.
>
> Cheers
>
More information about the TYPO3-dev
mailing list