From 705250b93dc71ae91d3c305b51e7a20611873805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 20 Sep 2013 09:32:49 +0200 Subject: [PATCH] fixes with new session class --- inc/3rdparty/Session.class.php | 2 +- inc/poche/Poche.class.php | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/inc/3rdparty/Session.class.php b/inc/3rdparty/Session.class.php index 08126ba..df913a0 100644 --- a/inc/3rdparty/Session.class.php +++ b/inc/3rdparty/Session.class.php @@ -136,7 +136,7 @@ class Session */ public static function logout() { - unset($_SESSION['uid'], $_SESSION['ip'], $_SESSION['expires_on']); + unset($_SESSION['uid'],$_SESSION['ip'],$_SESSION['expires_on'],$_SESSION['tokens'], $_SESSION['login'], $_SESSION['pass'], $_SESSION['poche_user']); } /** diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 2f0f703..8770c7f 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -331,16 +331,7 @@ class Poche if ($user != array()) { # Save login into Session Session::login($user['username'], $user['password'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']), array('poche_user' => new User($user))); - $this->messages->add('s', _('welcome to your poche')); - if (!empty($_POST['longlastingsession'])) { - $_SESSION['longlastingsession'] = 31536000; - $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; - session_set_cookie_params($_SESSION['longlastingsession']); - } else { - session_set_cookie_params(0); - } - session_regenerate_id(true); Tools::logm('login successful'); Tools::redirect($referer); }