Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 97 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 97 Rev 207
1
<?php
1
<?php
2
class DrupalUtilisateur extends Utilisateur {
2
class DrupalUtilisateur extends Utilisateur {
3
	
3
	
4
	public function getIdentifiantNumerique() {
4
	public function getIdentifiantNumerique() {
-
 
5
		
5
		return $GLOBALS['user']->uid;
6
		return $GLOBALS['user']->uid;		
-
 
7
		
6
	}
8
	}
7
	
9
	
8
	public function getEmail() {
10
	public function getEmail() {
9
		return $GLOBALS['user']->mail;
11
		return $GLOBALS['user']->mail;
10
	}
12
	}
11
	
13
	
12
	public function getNom() {
14
	public function getNom() {
13
		return $GLOBALS['user']->name;
15
		return $GLOBALS['user']->name;
14
	}
16
	}
15
	
17
	
16
	public function getPrenom() {
18
	public function getPrenom() {
17
		return '';	
19
		return '';	
18
	}
20
	}
19
	
21
	
20
	public function estAdmin() {
22
	public function estAdmin() {
21
		return in_array('3',array_keys($GLOBALS['user']->roles));
23
		return in_array('3',array_keys($GLOBALS['user']->roles));
22
	}
24
	}
23
	
25
	
24
	public function estIdentifie() {
26
	public function estIdentifie() {
25
 
-
 
26
		return user_is_logged_in();
27
		return user_is_logged_in();
27
	}
28
	}
28
	
29
	
29
	public function getFormulaireIdentification() {
30
	public function getFormulaireIdentification() {
30
		
31
		
31
		return drupal_get_form('user_login_block');
32
		return drupal_get_form('user_login_block');
32
	}
33
	}
33
	
34
	
34
	public function getFormulaireInscription() {
35
	public function getFormulaireInscription() {
35
		
36
		
36
		return drupal_get_form('user_register');
37
		return drupal_get_form('user_register');
37
	}
38
	}
38
}
39
}
39
?>
40
?>