In the Authentication example, for DB Authentication, it demonstrates using
$auth->getStorage()->write() to save mixed data with the authorization
session. We can then later use $auth->getStorage()->read() to get that
I'm trying to use this method so I can save my User model with the Auth
session. I've setup my User model similar to the getting starting guide, so
I have an input filter which is not created until I call the getInputFilter
method of my model.
I'm calling getInputFilter from my model so I can assign it to the form
before validation. After validation and authentication, I call
$auth->getStorage()->write($user) to save the user object with the session.
As soon as I call $auth->getStorage()->read(), I get a PHP Fatal Error "PHP
Fatal error: Exception thrown without a stack frame in Unknown on line 0,
If I comment the line that calls getInputFilter, everything works fine. Is
there a reason why I can't retrieve a model with an input filter from the
AuthenticationService's default Storage?
An easy way to solve it is to create a second User object and assign the
properties so I can use that in the Authentication session, but I dont see
why I should need to do that. Any insight is appreciated.