diff --git a/library/Application/Controller/Plugin/Auth.php b/library/Application/Controller/Plugin/Auth.php index 1111d1b8b..cc5a91341 100644 --- a/library/Application/Controller/Plugin/Auth.php +++ b/library/Application/Controller/Plugin/Auth.php @@ -47,14 +47,16 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract ->setParam('message', $messageF); } else { $storage = new Zend_Auth_Storage_Session(); - $session = new Zend_Session_Namespace($storage->getNamespace()); + Zend_Session::rememberMe(86400); + $session = new Zend_Session_Namespace($storage->getNamespace()); + $session->setExpirationSeconds(86400); $auth->setStorage($storage); } //Sinon on reste sur le standard } else { - Zend_Registry::get('firebug')->info('TIME : '.time()); + Zend_Registry::get('firebug')->info('TIME : '.date('Y-m-d H:i:s',time())); //Pas authentifié if ( !$auth->hasIdentity() || time() > $auth->getIdentity()->time ) { @@ -76,13 +78,13 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract $identity = $auth->getIdentity(); Zend_Registry::get('firebug')->info('TIMEOUT : '.$identity->timeout); - Zend_Registry::get('firebug')->info('ID TIME : '.$identity->time); + Zend_Registry::get('firebug')->info('ID TIME : '.date('Y-m-d H:i:s',$identity->time)); $identity->time = time() + $identity->timeout; - - Zend_Registry::get('firebug')->info('UP TIME : '.$identity->time); - + $auth->getStorage()->write($identity); + + Zend_Registry::get('firebug')->info('UP TIME : '.date('Y-m-d H:i:s',$auth->getIdentity()->time)); if (Zend_Session::namespaceIsset('login')){ Zend_Session::namespaceUnset('login');