Autorisé les connexions de tous les utilisateurs actifs

This commit is contained in:
Michael RICOIS 2015-06-11 12:59:59 +00:00
parent 3340c99443
commit 425401f8eb

View File

@ -104,34 +104,6 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
}
}
//No contrat define
if ( $identity->dateContrat=='0000-00-00 00:00:00' ) {
//If no params are detected, display a message to contact support
$request->setModuleName('default')
->setControllerName('aide')
->setActionName('message')
->setParam('typeMsg', 'support');
}
//Check dateContrat and calculate end of contrat
else {
$hour = intval(substr($identity->dateContrat,11,2));
$min = intval(substr($identity->dateContrat,14,2));
$sec = intval(substr($identity->dateContrat,17,2));
$month = intval(substr($identity->dateContrat,5,2)) + $identity->periodContrat;
$day = intval(substr($identity->dateContrat,8,2));
$year = intval(substr($identity->dateContrat,0,4));
$dateFinContrat = mktime($hour,$min,$sec,$month,$day,$year);
if ( time() > $dateFinContrat ) {
$request->setModuleName('default')
->setControllerName('user')
->setActionName('logout')
->setParam('message', "Votre Contrat est arrivé à expiration.");
}
}
$auth->getStorage()->write($identity);
if ( $identity->profil=="SuperAdministrateur" ) {