From 6ec4d4402961a30d3ab521b02001f2f8467f5207 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 12 Jan 2011 13:18:00 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20plugin=20pour=20la=20gestion=20du=20pre?= =?UTF-8?q?Dispatch=20g=C3=A9n=C3=A9ral?= 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, 5 insertions(+), 2 deletions(-) diff --git a/library/Application/Controller/Plugin/Auth.php b/library/Application/Controller/Plugin/Auth.php index 54da4dd0b..d04ba91dc 100644 --- a/library/Application/Controller/Plugin/Auth.php +++ b/library/Application/Controller/Plugin/Auth.php @@ -37,8 +37,11 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract $sessionNamespace = new Zend_Session_Namespace($storage->getNamespace()); $sessionNamespace->setExpirationSeconds($timeout); $auth->setStorage($storage); - $url = Zend_Registry::get('URL'); - $this->_response->setRedirect($url); + if (Zend_Registry::isRegistered('URL')){ + $url = Zend_Registry::get('URL'); + $this->_response->setRedirect($url); + } + $this->_response->setRedirect('/'); } } }