| Line 541... |
Line 541... |
| 541 |
&& ($utilisateur = $this->chargerUtilisateur($_COOKIE['coel_login'], $_COOKIE['coel_mot_de_passe']))) {
|
541 |
&& ($utilisateur = $this->chargerUtilisateur($_COOKIE['coel_login'], $_COOKIE['coel_mot_de_passe']))) {
|
| 542 |
$this->setUtilisateur($utilisateur, $_COOKIE['coel_permanence']);
|
542 |
$this->setUtilisateur($utilisateur, $_COOKIE['coel_permanence']);
|
| 543 |
}
|
543 |
}
|
| 544 |
}
|
544 |
}
|
| Line 545... |
Line 545... |
| 545 |
|
545 |
|
| 546 |
protected function rechargerCookieUtilisateur() {
|
546 |
/*protected function rechargerCookieUtilisateur() {
|
| 547 |
$utilisateur = $this->chargerUtilisateur($_COOKIE['coel_login']);
|
547 |
$utilisateur = $this->chargerUtilisateur($_COOKIE['coel_login']);
|
| 548 |
$this->setUtilisateur($utilisateur, $_COOKIE['coel_permanence']);
|
548 |
$this->setUtilisateur($utilisateur, $_COOKIE['coel_permanence']);
|
| Line 549... |
Line 549... |
| 549 |
}
|
549 |
}*/
|
| 550 |
|
550 |
|
| 551 |
protected function getUtilisateur() {
|
551 |
protected function getUtilisateur() {
|
| Line 594... |
Line 594... |
| 594 |
* @param unknown $utilisateur
|
594 |
* @param unknown $utilisateur
|
| 595 |
* @param number $permanence
|
595 |
* @param number $permanence
|
| 596 |
*/
|
596 |
*/
|
| 597 |
protected function setUtilisateur($utilisateur, $permanence = 1) {
|
597 |
protected function setUtilisateur($utilisateur, $permanence = 1) {
|
| 598 |
$_SESSION['coel_utilisateur'] = $utilisateur;
|
598 |
$_SESSION['coel_utilisateur'] = $utilisateur;
|
| 599 |
//$this->debug[] = $_SESSION['coel_utilisateur'];
|
- |
|
| 600 |
/*$this->setCookiePersistant('coel_login', $utilisateur['login'], $permanence);
|
- |
|
| 601 |
$this->setCookiePersistant('coel_mot_de_passe', $utilisateur['mot_de_passe'], $permanence);
|
- |
|
| 602 |
$this->setCookiePersistant('coel_permanence', $permanence, $permanence);*/
|
- |
|
| 603 |
$this->setCookiePersistant('coel_licence', $utilisateur['licence'], $permanence);
|
599 |
//$this->setCookiePersistant('coel_licence', $utilisateur['licence'], $permanence);
|
| 604 |
}
|
600 |
}
|
| Line 605... |
Line 601... |
| 605 |
|
601 |
|
| 606 |
protected function setCookiePersistant($cookie_nom, $valeur, $permanence = 1) {
|
602 |
protected function setCookiePersistant($cookie_nom, $valeur, $permanence = 1) {
|
| 607 |
setCookie($cookie_nom, $valeur, time() + ($permanence ? 100*24*60*60 : 60*60), self::$cookieChemin);
|
603 |
setCookie($cookie_nom, $valeur, time() + ($permanence ? 100*24*60*60 : 60*60), self::$cookieChemin);
|