Posted By

jsegars on 04/04/08


Tagged

typo3


Versions (?)

Working with Frontend Session Data


 / Published in: PHP
 

This allows any data to be temporarily saved in a user session (for both anonymous visitors and frontend users). The data is temporary though and will be destroyed once the user's cookie has expired.

  1. /* Save preference to user session */
  2. $GLOBALS["TSFE"]->fe_user->setKey("ses","tx_cfcampus_api", $campusUID);
  3. $GLOBALS["TSFE"]->fe_user->sesData_change = true;
  4. $GLOBALS["TSFE"]->fe_user->storeSessionData();
  5.  
  6. /* Retrieve preference from user session */
  7. $campusUID = $GLOBALS["TSFE"]->fe_user->getKey("ses","tx_cfcampus_api");

Report this snippet  

You need to login to post a comment.