Logout in case the session is not found

This commit is contained in:
Romain Neutron
2013-01-29 16:26:21 +01:00
parent b2285f0b3f
commit 774f6d541b
6 changed files with 66 additions and 9 deletions

View File

@@ -11,6 +11,8 @@
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Exception\SessionNotFound;
/**
*
* @package User
@@ -1461,6 +1463,10 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
$session = $app['EM']->find('Entities\Session', $app['session']->get('session_id'));
if (!$session) {
throw new SessionNotFound('No session found');
}
if (!$session->hasModuleId($app_id)) {
$module = new \Entities\SessionModule();