Subversion Repositories Applications.annuaire

Rev

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

Rev Author Line No. Line
69 aurelien 1
<?php
293 jpm 2
// declare(encoding='UTF-8');
69 aurelien 3
/**
293 jpm 4
 * Service
5
 *
6
 * @category	php 5.2
7
 * @package		Annuaire::Services
8
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
9
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
10
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
11
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
13
 * @version		$Id$
14
 */
15
class TestLoginMdp extends JRestService {
69 aurelien 16
 
17
	public function getElement($uid){
293 jpm 18
	   	if (!isset($uid[0]) || $uid[0] == '' || !isset($uid[1]) || $uid[1] == '') {
69 aurelien 19
	   		$this->envoyer(false);
20
	   		return;
21
	   	}
22
 
23
	   	$mail_utilisateur = $uid[0];
24
	   	$pass = $uid[1];
25
 
26
	   	// TODO vérifier que le mot de passe est crypté !
27
 
28
	    $id_annuaire = Config::get('annuaire_defaut');
29
 
30
	    $controleur = new AnnuaireControleur();
31
		$id_match_pass = $controleur->comparerIdentifiantMotDePasse($id_annuaire,$mail_utilisateur, $pass, true, true);
32
 
33
		$this->envoyer($id_match_pass);
34
	}
35
}
36
?>