Subversion Repositories Applications.annuaire

Rev

Rev 94 | Details | Compare with Previous | Last modification | View Log | RSS feed

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