I have a strange problem with the session after an authentication.
The whole authentification part works, troubles come after that :
$result = $this->getAuthService()->authenticate();
if ($result->isValid()) {
$storage = $this->getAuthService()->getStorage();
$storage->write(($this->getAuthService()
->getAdapter()
->getResultRowObject(array(
'email_utilisateur',
'password_utilisateur',
))));
$redirect = 'success';
}
Right now, I am logged, and email+password are stored, in the "Zend_Auth" key (don't pay attention to the fact that I store password btw, it's for the example ^^).
But when I go on another page (even if it's the same), my Session key "Zend_auth" gets broken, and I have an incomplete PHP object....
Array
(
[__ZF] => Array
(
[_REQUEST_ACCESS_TIME] => 1369667659.7526
)
[Zend_Auth] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => Zend\Stdlib\ArrayObject
)
)
So, any idea why changing page would screw my session variable ?
Thanks in advance, I've spent like 5 hours on this problem, testing things etc...
EDIT 28/05/2013 :
So, I still didn't find. Anyway, the object that gets corrupted is a Zend\Stdlib\ArrayObject. A reason why this arrayobject gets corrupted would be that the session starts before the inclusion avec Zend\Stdlib\ArrayObject. I'll try to figure it out, but if that's the reason, then it's a bug of the framework. By the way, I'm using ZF 2.2.