Subversion Repositories eFlore/Applications.cel

Rev

Rev 798 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 798 Rev 1090
Line 23... Line 23...
23
		$this->max_exec_time = ini_get('max_execution_time');
23
		$this->max_exec_time = ini_get('max_execution_time');
24
	}
24
	}
Line 25... Line 25...
25
 
25
 
26
	public function isAdmin($id) {
26
	public function isAdmin($id) {
27
		$admins = $this->config['jrest_admin']['admin'];
27
		$admins = $this->config['jrest_admin']['admin'];
Line 28... Line 28...
28
		$admin_tab = split(',',$admins);
28
		$admin_tab = explode(',',$admins);
29
 
29
 
30
		if (in_array($id,$admin_tab)) {
30
		if (in_array($id,$admin_tab)) {
31
			return true;
31
			return true;
32
		} else {
32
		} else {
33
			return false;
33
			return false;
Line 34... Line 34...
34
		}
34
		}
35
	}
35
	}
36
 
36
 
37
	public function controleUtilisateur($id) {
37
	public function controleUtilisateur($id) {
38
		if ($_SESSION['user']['name'] == '') {
38
		if (!isset($_SESSION['user']['name']) || $_SESSION['user']['name'] == '') {
39
			//cas de la session temporaire, on ne fait rien de particulier
39
			//cas de la session temporaire, on ne fait rien de particulier
40
		} else {
40
		} else {