| 259 |
david |
1 |
<?php
|
| 291 |
jpm |
2 |
// declare(encoding='UTF-8');
|
| 259 |
david |
3 |
/**
|
| 291 |
jpm |
4 |
* Service retournant des informations sur l'utilisateur.
|
|
|
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 InformationsUtilisateur extends JRestService {
|
| 259 |
david |
16 |
|
|
|
17 |
public function getElement($uid){
|
|
|
18 |
$mail_utilisateur = $uid[0];
|
|
|
19 |
|
|
|
20 |
$identificateur = new IdentificationControleur();
|
|
|
21 |
$login = $identificateur->obtenirLoginUtilisateurParCookie();
|
|
|
22 |
|
|
|
23 |
|
| 291 |
jpm |
24 |
if ($mail_utilisateur != $login) {
|
| 259 |
david |
25 |
return;
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
$id_annuaire = Config::get('annuaire_defaut');
|
|
|
29 |
|
|
|
30 |
$controleur = new AnnuaireControleur();
|
| 291 |
jpm |
31 |
$valeurs = $controleur->obtenirInfosUtilisateurOpenId($id_annuaire, $mail_utilisateur, true);
|
| 259 |
david |
32 |
|
|
|
33 |
$this->envoyer($valeurs);
|
|
|
34 |
}
|
|
|
35 |
}
|
| 69 |
aurelien |
36 |
?>
|