mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Merge pull request #742 from romainneutron/fix-1555
Fix #1555 : API sessions remain 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