mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Fix #1555 : API sessions remains open
This commit is contained in:
@@ -920,6 +920,14 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
{
|
||||
$app['session']->clear();
|
||||
$app['session']->set('usr_id', self::$DI['user']->get_id());
|
||||
$session = new \Entities\Session();
|
||||
$session->setUsrId(self::$DI['user']->get_id());
|
||||
$session->setUserAgent('');
|
||||
self::$DI['app']['EM']->persist($session);
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
||||
$app['session']->set('session_id', $session->getId());
|
||||
|
||||
self::$DI['app']['authentication']->reinitUser();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user