Fix #1594 : Removed users are not disconnected

This commit is contained in:
Romain Neutron
2013-11-28 10:47:02 +01:00
parent 5504f9013a
commit 7a8f77c569
4 changed files with 116 additions and 0 deletions

View File

@@ -974,6 +974,12 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
$this->app['EM']->remove($provider);
}
$repo = $this->app['EM']->getRepository('Entities\Session');
foreach ($repo->findByUser($this) as $session) {
$this->app['EM']->remove($session);
}
$this->app['EM']->flush();
$sql = 'UPDATE usr SET usr_login = :usr_login , usr_mail = null