Subversion Repositories eFlore/Applications.cel

Rev

Rev 975 | Rev 2182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 975 Rev 1360
Line 75... Line 75...
75
	}
75
	}
Line 76... Line 76...
76
	
76
	
77
	private function recupererPrenomNomIdentifie() {
77
	private function recupererPrenomNomIdentifie() {
78
		$nom = '';
78
		$nom = '';
79
		if ($this->getAuthIdentifiant() != null) {
79
		if ($this->getAuthIdentifiant() != null) {
80
			$infos_utilisateur = $this->recupererUtilisateursIdentite(array($this->getAuthIdentifiant()));
80
			$infos_utilisateur = $this->recupererUtilisateursNomPrenom(array($this->getAuthIdentifiant()));
81
			if (array_key_exists($this->getAuthIdentifiant(), $infos_utilisateur)) {
81
			if (array_key_exists($this->getAuthIdentifiant(), $infos_utilisateur)) {
-
 
82
				$utilisateur = (array) $infos_utilisateur[$this->getAuthIdentifiant()];
82
				$nom = $infos_utilisateur[$this->getAuthIdentifiant()]['intitule'];
83
				$nom = $utilisateur['prenom'].' '.$utilisateur['nom'];
83
			} else {
84
			} else {
84
				$nom = $this->getAuthIdentifiant();
85
				$nom = $this->getAuthIdentifiant();
85
			}
86
			}
86
		}
87
		}
Line 171... Line 172...
171
	
172
	
172
	public function executerListeUtilisateursNbrePhotos() {
173
	public function executerListeUtilisateursNbrePhotos() {
173
		$widget = null;
174
		$widget = null;
174
		$utilisateurs = $this->recupererStatsTxtListeUtilisateursNbrePhotos();
175
		$utilisateurs = $this->recupererStatsTxtListeUtilisateursNbrePhotos();
175
		if (isset($utilisateurs)) {
176
		if (isset($utilisateurs)) {
176
			$noms = $this->recupererUtilisateursIdentite(array_keys($utilisateurs));
177
			$noms = $this->recupererUtilisateursNomPrenom(array_keys($utilisateurs));
177
			foreach ($utilisateurs as $courriel => $infos) {
178
			foreach ($utilisateurs as $courriel => $infos) {
178
				if (array_key_exists($courriel, $noms)) {
179
				if (array_key_exists($courriel, $noms)) {
179
					$nom_infos = (array) $noms[$courriel];
180
					$nom_infos = (array) $noms[$courriel];
180
					$nom_fmt = $nom_infos['intitule'];
181
					$nom_fmt = $nom_infos['prenom'].' '.$nom_infos['nom'];
181
					$widget['donnees']['utilisateurs'][$nom_fmt] = $infos;
182
					$widget['donnees']['utilisateurs'][$nom_fmt] = $infos;
182
				}
183
				}
183
			}
184
			}
184
		}
185
		}
Line 213... Line 214...
213
		$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service);
214
		$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service);
Line 214... Line 215...
214
		
215
		
215
		$json = $this->getDao()->consulter($url);
216
		$json = $this->getDao()->consulter($url);
216
		return (array) json_decode($json);
217
		return (array) json_decode($json);
217
	}
-
 
218
}
218
	}
-
 
219
}
-
 
220
?>
219
221