[TYPO3-mvc] Update Session Key

Johannes Regner johannes-regner at web.de
Tue May 26 14:25:40 CEST 2015


Hi,
in my show Acction, i set the following session keys:
$GLOBALS['TSFE']->fe_user->setKey('ses', "NEXT_PAGE_PHOTO", $next_page); 
$GLOBALS['TSFE']->fe_user->setKey('ses', "SET_NUM_PHOTO", 1); 
$GLOBALS["TSFE"]->fe_user->sesData_change = true;
$GLOBALS["TSFE"]->fe_user->storeSessionData();

This, works fine, then in the view i make an ajax call who loads the load action with following:
$json_link = $GLOBALS["TSFE"]->fe_user->getKey("ses","NEXT_PAGE_PHOTO");
$setnum = $GLOBALS["TSFE"]->fe_user->getKey("ses","SET_NUM_PHOTO");
-> This works. But then i will update the same keys with:
$GLOBALS['TSFE']->fe_user->setKey('ses', "NEXT_PAGE_PHOTO", $next_page); 
$GLOBALS['TSFE']->fe_user->setKey('ses', "SET_NUM_PHOTO", $setnum); 
$GLOBALS["TSFE"]->fe_user->sesData_change = true;
$GLOBALS["TSFE"]->fe_user->storeSessionData();

But TYPO3 doestn update the keys value, he always uses the first setkey... is there any method to update session keys values?

Thx!


More information about the TYPO3-project-typo3v4mvc mailing list