From ffa165dd3df3aae389f5a028549d07f42204d577 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 9 Sep 2011 10:14:53 +0000 Subject: [PATCH] =?UTF-8?q?Lors=20d'une=20requete=20ajax=20on=20redirige?= =?UTF-8?q?=20le=20tout=20vers=20la=20page=20de=20d=C3=A9connexion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/Application/Controller/Plugin/Auth.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Application/Controller/Plugin/Auth.php b/library/Application/Controller/Plugin/Auth.php index 1f31d9be7..590832bec 100644 --- a/library/Application/Controller/Plugin/Auth.php +++ b/library/Application/Controller/Plugin/Auth.php @@ -58,7 +58,12 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract $auth->clearIdentity(); $session = new Zend_Session_Namespace('login'); $session->url = $_SERVER['REQUEST_URI']; - + + $layout = Zend_Layout::getMVCInstance(); + if (!$layout->isEnabled()) + { + $this->_response->setRedirect('/user/logout')->sendResponse(); + } $this->_response->setRedirect('/user/login')->sendResponse(); //Authentifié => on met à jour la session