[eluser]Gerep[/eluser]
'm using CI and I have a UserModel that selects the user based on login information and sets a userVO and add this userVO in a session like this:
Code:
$this->session->set_userdata('user', $userVO);
When I try to access this session it return me this error:
Code:
Message: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "UserVO" 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
I have found a "solution", I need CI to load the UserVO class before session class and it works.
The problem is that I have lots os VO classes and I'll need them inside the session and is a bad thing to autoload them because I won't need them all at the same time.
Is there any workaround?
Thanks in advance for any help.