Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 207 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 210
1
<?php
1
<?php
2
abstract class Utilisateur extends aControleur {
2
abstract class Utilisateur extends aControleur {
3
	
3
	
4
	public function setIdentite($identite) {
4
	public function setIdentite($identite) {
-
 
5
		
-
 
6
		$id_identite = $this->getIdUtilisateurPourNom($identite);
-
 
7
		
-
 
8
		if($id_identite) {
5
		$_SESSION['ods_saisie']['identite'] = $identite;
9
			$_SESSION['ods_saisie']['identite'] = $id_identite;
-
 
10
		} else  {
-
 
11
			$_SESSION['ods_saisie']['identite'] = $this->getIdentifiantNumerique();
-
 
12
		}		
6
	}
13
	}
7
	
14
	
8
	public function getIdentite() {
15
	public function getIdentite() {
9
		if($this->estAdmin()) {
16
		if($this->estAdmin()) {
10
			if(!isset($_SESSION['ods_saisie']['identite']) || $_SESSION['ods_saisie']['identite'] == '') {
17
			if(!isset($_SESSION['ods_saisie']['identite']) || $_SESSION['ods_saisie']['identite'] == '') {
11
				return $this->getIdentifiantNumerique();
18
				return $this->getIdentifiantNumerique();
12
			}
19
			}
13
			return $_SESSION['ods_saisie']['identite'];
20
			return $_SESSION['ods_saisie']['identite'];
14
		} else {
21
		} else {
15
			return $this->getIdentifiantNumerique();
22
			return $this->getIdentifiantNumerique();
16
		}
23
		}
17
	}
24
	}
-
 
25
	
-
 
26
	public function getIdentiteNom() {
-
 
27
		if($this->estAdmin()) {
-
 
28
			if(!isset($_SESSION['ods_saisie']['identite']) || $_SESSION['ods_saisie']['identite'] == '') {
-
 
29
				return $this->getNom();
-
 
30
			}
-
 
31
			return $this->getNomUtilisateurPourId($_SESSION['ods_saisie']['identite']);
-
 
32
		} else {
-
 
33
			return $this->getNom();
-
 
34
		}
-
 
35
	}
-
 
36
	
-
 
37
	public function getNomUtilisateurPourId($id) {
-
 
38
		return '';
-
 
39
	}
-
 
40
	
-
 
41
	public function getIdUtilisateurPourNom($nom) {
-
 
42
		return 0;
-
 
43
	}
18
	
44
	
19
	public function getIdentifiantNumerique() {
45
	public function getIdentifiantNumerique() {
20
		return 0;
46
		return 0;
21
	}
47
	}
22
	
48
	
23
	public function getEmail() {
49
	public function getEmail() {
24
		return '';
50
		return '';
25
	}
51
	}
26
	
52
	
27
	public function getNom() {
53
	public function getNom() {
28
		return '';
54
		return '';
29
	}
55
	}
30
	
56
	
31
	public function getPrenom() {
57
	public function getPrenom() {
32
		return '';	
58
		return '';	
33
	}
59
	}
34
	
60
	
35
	public function estIdentifie() {
61
	public function estIdentifie() {
36
		return false;
62
		return false;
37
	}
63
	}
38
	
64
	
39
	public function estAdmin() {
65
	public function estAdmin() {
40
		return false;
66
		return false;
41
	}
67
	}
42
	
68
	
43
	public function getFormulaireidentification() {
69
	public function getFormulaireidentification() {
44
		return '';
70
		return '';
45
	}
71
	}
46
	
72
	
47
	public function getFormulaireInscription() {
73
	public function getFormulaireInscription() {
48
		
74
		
49
		return '';
75
		return '';
50
	}
76
	}
51
}
77
}
52
?>
78
?>