/**
* After the session has been started we need to populate it with some default values.
*
* @param SessionEvent $event Session event being triggered
*
* @return void
*
* @since 3.0.1
*/
public function afterSessionStart(SessionEvent $event)
{
$session = $event->getSession();
if ($session->isNew()) {
$session->set('registry', new Registry());
$session->set('user', new User());
}
// Ensure the identity is loaded
if (!$this->getIdentity()) {
$this->loadIdentity($session->get('user'));
}
}