On définit à nouveau le rememberMe et le setExpirationSeconds mais cette fois à 86400 secondes, soit une journée
This commit is contained in:
parent
88a087396e
commit
88a60937f5
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user