Subversion Repositories Applications.annuaire

Rev

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

Rev 396 Rev 399
Line 265... Line 265...
265
	 *  - message : contient un message d'information complémentaire de l'état.
265
	 *  - message : contient un message d'information complémentaire de l'état.
266
	 */
266
	 */
267
	private function createConnexion() {
267
	private function createConnexion() {
268
		$courriel = stripslashes($this->donnees['courriel']);
268
		$courriel = stripslashes($this->donnees['courriel']);
269
		$mdp = stripslashes($this->donnees['mdp']);
269
		$mdp = stripslashes($this->donnees['mdp']);
270
		$persistance = stripslashes($this->donnees['persistance']);
270
		$persistance = (stripslashes($this->donnees['persistance']) == 'true') ? true : false;
Line 271... Line 271...
271
 
271
 
-
 
272
		$infos = null;
272
		$infos = null;
273
		$infos['persistance'] = $persistance;
273
		if ($this->verifierAcces($courriel, $mdp)) {
274
		if ($this->verifierAcces($courriel, $mdp)) {
274
			$infos['identifie'] = true;
275
			$infos['identifie'] = true;
275
			$infos['message'] = "Bienvenu.";
276
			$infos['message'] = "Bienvenu.";
276
			$dureeCookie = 0;
277
			$dureeCookie = 0;
277
			if ($persistance) {
278
			if ($persistance === true) {
278
				$dureeCookie = time()+3600*24*30;
279
				$dureeCookie = time()+3600*24*30;
279
				$this->creerCookiePersistant($dureeCookie, $courriel, $mdp);
280
				$this->creerCookiePersistant($dureeCookie, $courriel, $mdp);
280
			}
281
			}
281
			$this->creerCookieUtilisateur($dureeCookie, $courriel);
282
			$this->creerCookieUtilisateur($dureeCookie, $courriel);