I'm trying to store values in the session to be used elsewhere by various views and controllers. problem is, I don't appear to be actually storing any information. So, here's where I setup the session in the bootstrap:
$di->setShared('session', function() {
$session = new \Phalcon\Session\Adapter\Files();
$session->start();
return $session;
});
Later, in the LoginController, I'm trying to stash data in the session:
$this->session->set('userid',$user->ID);
but, on further inspection when interrupting the process (and why this data is never stored) I found this when analyzing the login controller's output:
Notice: Trying to get property of non-object in C:\workspace\GIIAnalytics\app\controllers\LoginController.php on line 32
line 32 is the one pasted above. I don't understand what I'm missing here. Any help would be appreciated.