Subversion Repositories Sites.obs-saisons.fr

Rev

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

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