Sadly this does not work. It seems to be to late. If the Session is destroyed
using this Event it will also destroy a previously initiated Session for
ZfcUser and thus the login does not work. Does anyone have an idea? This is
the whole code:
public function onBootstrap(\Zend\Mvc\MvcEvent $e) {
$app = $e->getParam('application');
$em = $app->getEventManager()->getSharedManager();
$em->attach('ZfcUser\Authentication\Adapter\AdapterChain',
'authenticate.pre', function($e) {
$session = new \Zend\Session\Container('****');
$session->getManager()->destroy();
});
}
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-ZfcUser-Clear-Sessions-before-login-tp4657794p4657796.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]