Subversion Repositories Applications.annuaire

Rev

Rev 56 | Rev 96 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 56 Rev 85
1
<?php
1
<?php
2
/**
2
/**
3
* PHP Version 5
3
* PHP Version 5
4
*
4
*
5
* @category  PHP
5
* @category  PHP
6
* @package   annuaire
6
* @package   annuaire
7
* @author    aurelien <aurelien@tela-botanica.org>
7
* @author    aurelien <aurelien@tela-botanica.org>
8
* @copyright 2010 Tela-Botanica
8
* @copyright 2010 Tela-Botanica
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @version   SVN: <svn_id>
10
* @version   SVN: <svn_id>
11
* @link      /doc/annuaire/
11
* @link      /doc/annuaire/
12
*/
12
*/
13
 
13
 
14
Class IdentificationControleur extends Controleur {
14
Class IdentificationControleur extends Controleur {
15
 
15
 
16
	private $nom_cookie_persistant = '';
16
	private $nom_cookie_persistant = '';
17
	private $duree_identification = '0';
17
	private $duree_identification = '0';
18
	private $fonction_cryptage_mdp_cookie = 'sha1';
18
	private $fonction_cryptage_mdp_cookie = 'md5';
-
 
19
	private $objet_identification = null;
-
 
20
	
-
 
21
	/*public function IdentificationControleur() {
19
 
22
 
20
	public function IdentificationControleur() {
23
		Controleur::__construct();
21
		//$this->cookie_persistant_nom = session_name().'-memo';
24
		$this->cookie_persistant_nom = session_name().'-memo';
22
		$this->cookie_persistant_nom = 'pap-admin_papyrus_-memo';
25
		$this->cookie_persistant_nom = 'pap-admin_papyrus_-memo';
23
		$this->duree_identification = time()+Config::get('duree_session_identification');
26
		$this->duree_identification = time()+Config::get('duree_session_identification');
24
		$this->fonction_cryptage_mdp_cookie = Config::get('fonction_cryptage_mdp_cookie');
27
		$this->fonction_cryptage_mdp_cookie = Config::get('fonction_cryptage_mdp_cookie');
-
 
28
		
25
	}
29
	}*/
26
 
30
 
27
	public function afficherFormulaireIdentification($id_annuaire, $donnees = array()) {
31
	public function afficherFormulaireIdentification($id_annuaire, $donnees = array()) {
28
 
32
 
29
		$this->chargerModele('AnnuaireModele');
33
		$this->chargerModele('AnnuaireModele');
30
		$annuaire = $this->AnnuaireModele->chargerAnnuaire($id_annuaire);
34
		$annuaire = $this->AnnuaireModele->chargerAnnuaire($id_annuaire);
-
 
35
 
-
 
36
		if(!isset($donnees['informations'])) {
-
 
37
			$donnees['informations'] = array();
-
 
38
		}
-
 
39
 
-
 
40
		$donnees['id_annuaire'] = $id_annuaire;
31
 
41
 
-
 
42
		return $this->getVue(Config::get('dossier_squelettes_formulaires').'identification',$donnees);
-
 
43
	}
-
 
44
 
-
 
45
	public function loggerUtilisateur($utilisateur, $pass) {
-
 
46
		
-
 
47
		$this->objet_identification = Config::get('objet_identification');
-
 
48
 
-
 
49
		// On loggue l'utilisateur
-
 
50
		$this->objet_identification->username = $utilisateur;
-
 
51
		$this->objet_identification->password = $pass;
-
 
52
		$this->objet_identification->login();
-
 
53
 
32
		return $this->getVue(Config::get('dossier_squelettes_formulaires').$annuaire['informations']['aa_code'].'_identification',$donnees);
54
		return true;
33
	}
55
	}
34
}
56
}
35
?>
57
?>