Subversion Repositories Applications.annuaire

Compare Revisions

Ignore whitespace Rev 93 → Rev 94

/branches/V1.0-Aigle/controleurs/IdentificationControleur.php
New file
0,0 → 1,57
<?php
/**
* PHP Version 5
*
* @category PHP
* @package annuaire
* @author aurelien <aurelien@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @version SVN: <svn_id>
* @link /doc/annuaire/
*/
 
Class IdentificationControleur extends Controleur {
 
private $nom_cookie_persistant = '';
private $duree_identification = '0';
private $fonction_cryptage_mdp_cookie = 'md5';
private $objet_identification = null;
/*public function IdentificationControleur() {
 
Controleur::__construct();
$this->cookie_persistant_nom = session_name().'-memo';
$this->cookie_persistant_nom = 'pap-admin_papyrus_-memo';
$this->duree_identification = time()+Config::get('duree_session_identification');
$this->fonction_cryptage_mdp_cookie = Config::get('fonction_cryptage_mdp_cookie');
}*/
 
public function afficherFormulaireIdentification($id_annuaire, $donnees = array()) {
 
$this->chargerModele('AnnuaireModele');
$annuaire = $this->AnnuaireModele->chargerAnnuaire($id_annuaire);
 
if(!isset($donnees['informations'])) {
$donnees['informations'] = array();
}
 
$donnees['id_annuaire'] = $id_annuaire;
 
return $this->getVue(Config::get('dossier_squelettes_formulaires').'identification',$donnees);
}
 
public function loggerUtilisateur($utilisateur, $pass) {
$this->objet_identification = Config::get('objet_identification');
 
// On loggue l'utilisateur
$this->objet_identification->username = $utilisateur;
$this->objet_identification->password = $pass;
$this->objet_identification->login();
 
return true;
}
}
?>