I’m new to PHP and Zend, and I would like to cache sensitive data about a logged user. The problem is that I don’t want the user to be able to change values of this data, so I don’t know how to store it.
I wanted to store it in Zend_Register once the user has logged in, but I don’t think this is the right solution.
Zend_Registry::set('ud', $userData);
Then I retrieve the data in another controller :
$ud = Zend_Registry::get('ud');
Is there another way to do this ? like storing the values in cookies, and checking their integrity with a hash, or setting-up a server-side cache per session…
Thanks in advance,
Jerec
I would suggest to use Zend_Session
Now the interessting part, to take care of integrity you could use some kind of hash.. (not sure if this a good solution?). But if the server is configured correct, the session should be save..