I use zend/Auth. To store login data in session after successful login as stated here:
I did use:
$auth->setStorage(new SessionStorage(‘someNamespace’));
But I did not like the session array format but I prefer this format:
$this->session->regenerateId(true);
$this->session->setStorage(new SessionArrayStorage($contents));
$this->session->getValidatorChain()->attach(‘session.validate’, array(new RemoteAddr(), ‘isValid’));
$this->session->getValidatorChain()->attach(‘session.validate’, array(new HttpUserAgent(), ‘isValid’));
So I did use custom LoginStore as stated on wiki to use the code above, in write() method I did put above and after this I did print $_SESSION and I see the data, but I don’t see $_SESSION anywhere else! Somehow I think this $_SESSION is not set globally and only have values within the class! How to fix it?