153,7 → 153,7 |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// TRAITEMENT des URLs et des PARAMÊTRES |
|
|
private function collecterParametres() { |
if (isset($_GET) && $_GET != '') { |
foreach ($_GET as $cle => $valeur) { |
161,7 → 161,7 |
} |
} |
} |
|
|
private function recupererParametresUrl() { |
if (isset($_GET)) { |
$get_params = array('orderby', 'distinct', 'start', 'limit', 'formatRetour'); |
291,7 → 291,7 |
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION DES CLASSES CHARGÉES À LA DEMANDE |
|
|
protected function getRestClient() { |
if (!isset($this->restClient)) { |
$this->restClient = new CelRestClient(); |
298,7 → 298,7 |
} |
return $this->restClient; |
} |
|
|
//+----------------------------------------------------------------------------------------------------------------+ |
// GESTION DU DAO |
|
361,7 → 361,7 |
} |
|
public function controleUtilisateur($id) { |
|
|
if (isset($_SESSION['user']) && isset($_SESSION['user']['name']) && $_SESSION['user']['name'] == '') { |
//cas de la session temporaire, on ne fait rien de particulier |
} else { |
411,7 → 411,7 |
$url = sprintf($this->config['settings']['baseURLServicesAnnuaireTpl'], $service); |
$json = $this->getRestClient()->consulter($url); |
$existe = json_decode($json); |
|
|
$autorisation = (isset($existe) && $existe) ? true :false; |
return $autorisation; |
} |
449,19 → 449,20 |
$auteurs = ($pourAdmin) ? $courriels : $this->recupererUtilisateursNomPrenom($courriels); |
return $auteurs; |
} |
|
|
protected function recupererUtilisateursIdentite(Array $courriels) { |
// Récupération des données au format Json |
$service = "utilisateur/identite-par-courriel/".implode(',', $courriels); |
$url = sprintf($this->config['settings']['baseURLServicesAnnuaireTpl'], $service); |
$json = file_get_contents($url); |
$utilisateurs = json_decode($json); |
$utilisateurs = json_decode($json, true); |
$noms = array(); |
foreach ($courriels as $courriel) { |
$courriel = strtolower($courriel); |
$info = array('id' => null, 'intitule' => ''); |
if (isset($utilisateurs->$courriel)) { |
$info['intitule'] = $utilisateurs->$courriel->intitule; |
$info['id'] = $utilisateurs->$courriel->id; |
if (isset($utilisateurs[$courriel])) { |
$info['intitule'] = $utilisateurs[$courriel]['intitule']; |
$info['id'] = $utilisateurs[$courriel]['id']; |
} else { |
$info['intitule'] = $this->tronquerCourriel($courriel); |
} |
475,10 → 476,11 |
$service = "utilisateur/prenom-nom-par-courriel/".implode(',', $courriels); |
$url = sprintf($this->config['settings']['baseURLServicesAnnuaireTpl'], $service); |
$json = file_get_contents($url); |
$utilisateurs = json_decode($json); |
$utilisateurs = json_decode($json, true); |
foreach ($courriels as $courriel) { |
if (isset($utilisateurs->$courriel)) { |
$noms[$courriel] = $utilisateurs->$courriel->prenom.' '.$utilisateurs->$courriel->nom; |
$courriel = strtolower($courriel); |
if (isset($utilisateurs[$courriel])) { |
$noms[$courriel] = $utilisateurs[$courriel]['prenom'].' '.$utilisateurs[$courriel]['nom']; |
} else { |
$noms[$courriel] = $this->tronquerCourriel($courriel); |
} |