Subversion Repositories Applications.annuaire

Rev

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

Rev 106 Rev 120
Line 9... Line 9...
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @version   SVN: <svn_id>
10
* @version   SVN: <svn_id>
11
* @link      /doc/annuaire/
11
* @link      /doc/annuaire/
12
*/
12
*/
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
Class IdentificationControleur extends Controleur {
14
Class IdentificationControleur extends AppControleur {
15
 
15
 
16
	private $nom_cookie_persistant = '';
16
	private $nom_cookie_persistant = '';
17
	private $duree_identification = '0';
17
	private $duree_identification = '0';
Line 44... Line 44...
44
 
44
 
Line 45... Line 45...
45
	public function loggerUtilisateur($utilisateur, $pass) {
45
	public function loggerUtilisateur($utilisateur, $pass) {
Line -... Line 46...
-
 
46
		
-
 
47
		$this->objet_identification = Config::get('objet_identification');
-
 
48
 
-
 
49
		// Expiration si l'utilisateur ne referme pas son navigateur
-
 
50
		$this->objet_identification->setExpire(0);
-
 
51
		// Création d'un cookie pour rendre permanente l'identification de Papyrus
46
		
52
		$cookie_val = md5($pass).$utilisateur;
47
		$this->objet_identification = Config::get('objet_identification');
53
		setcookie(session_name().'-memo', $cookie_val, 0, '/');
48
 
54
		
49
		// On loggue l'utilisateur
55
		// On loggue l'utilisateur
Line 56... Line 62...
56
	
62
	
Line 57... Line 63...
57
	public function deLoggerUtilisateur() {
63
	public function deLoggerUtilisateur() {
58
		
64
		
59
		$this->objet_identification = Config::get('objet_identification');
65
		$this->objet_identification = Config::get('objet_identification');
60
		$this->objet_identification->logout();
66
		$this->objet_identification->logout();
61
 
67
		
Line 62... Line 68...
62
		return true;
68
		return true;