1,9 → 1,20 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Service d'envoie de courriel. |
* |
* @category php 5.2 |
* @package Annuaire::Services |
* @author Aurélien PERONNET <aurelien@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org) |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version $Id$ |
*/ |
class EnvoiMessage extends JRestService { |
|
Class EnvoiMessage extends JRestService { |
|
public function getElement($uid){ |
|
$identificateur = new IdentificationControleur(); |
$login = $identificateur->obtenirLoginUtilisateurParCookie(); |
|
10,7 → 21,7 |
$identification = $login; |
|
if(!$identification || trim($identification) == '') { |
print "false"; |
print 'false'; |
return; |
} |
$id_annuaire = Config::get('annuaire_defaut'); |
21,11 → 32,11 |
|
$messagerie = new MessageControleur(); |
|
// on remplace les identifiants par leurs destinataires |
// Remplacement les identifiants par leurs destinataires |
$destinataire_mail = $messagerie->obtenirMailParTableauId($id_annuaire, array($destinataire)); |
|
if(empty($destinataire_mail)) { |
print "false"; |
print 'false'; |
return; |
} |
|
36,11 → 47,9 |
if($retour) { |
header('Location: '.'http://'.$redirect); |
exit; |
|
} else { |
print "false"; |
print 'false'; |
} |
} |
} |
|
?> |
?> |