Fatal error: The script tried to execute a method or access a property of an incomplete object.
Please ensure that the class definition "Membre\Entity\Membre" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition
When i want to get identity from zfcUserAuthentication like this:
$id = $this->zfcUserAuthentication()->getIdentity()->getId();
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Membre\Entity\Membre" of the object you are trying to operate on was loaded before unserialize() gets called or provide a __autoload() function to load the class definition
Here is my entity: http://pastebin.com/tw1aC6ZQ
<?php $options = array( 'objectManager' => $this->getEm(), 'objectRepository' => $this->getEm()->getRepository('Membre\Entity\Membre') , 'identityClass' => 'Membre\Entity\Membre', 'identityProperty' => $identityColumn, 'credentialProperty' => 'password'
'credentialCallable' => null
$authenticationService = new \Zend\Authentication\AuthenticationService(); $authResult = $authenticationService->authenticate($doctrineAuthAdapter); ?>
To avoid this error i can do: $authenticationService->getStorage()->write(serialize($identity));
But then, i can't use $this->zfcUserAuthentication()->getIdentity()->getId() : Fatal error: Call to a member function getId() on a non-object