In my System Im using an Object User
to store all the needend UserData wich I get from the Database.
In the Session Im storing the User ID. On Page call I query the User Data from the DB and store it into the User
-Object.
Now I saw somebody storing all the User
-Object into the Session.
I wondered whats the better way?
I saw this Post here on SO, wich helped a bit.
But 2 Things:
1) To lower the risk of Session-Hijacking Im creating a new Session on every Page Load. Therefore all the Data from the Session Object gets transfered.
2) Somthere else I saq that PHP 5 has an Cache already in the Pack. So Does it automaticly store the User Object?
Thanks in advance for your replays!