Modification condition de vérification de l'authentification
This commit is contained in:
parent
5cd16adb94
commit
397ed5495f
@ -9,16 +9,19 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
|
||||
*/
|
||||
public function preDispatch(Zend_Controller_Request_Abstract $request)
|
||||
{
|
||||
if ($request->getControllerName()!='user' && $request->getActionName()!='login')
|
||||
if ($request->getActionName()!='login')
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
Zend_Registry::get('firebug')->info('COUCOU');
|
||||
Zend_Registry::get('firebug')->info($auth->hasIdentity());
|
||||
//Pas authentifié
|
||||
if (!$auth->hasIdentity()) {
|
||||
|
||||
$auth->clearIdentity();
|
||||
$session = new Zend_Session_Namespace('login');
|
||||
$session->url = $_SERVER['REQUEST_URI'];
|
||||
$this->_response->setRedirect('/user/login');
|
||||
|
||||
$this->_response->setRedirect('/user/login')->sendResponse();
|
||||
|
||||
//Authentifié => on met à jour la session
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user