diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-09-20 09:32:49 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-09-20 09:32:49 +0200 |
commit | 705250b93dc71ae91d3c305b51e7a20611873805 (patch) | |
tree | 5a839dca431e69aab711ebd48ab7cd712f3792de /inc | |
parent | 0d64be15de12cd949fc9b9d2b8352a1815da965a (diff) | |
download | wallabag-705250b93dc71ae91d3c305b51e7a20611873805.tar.gz wallabag-705250b93dc71ae91d3c305b51e7a20611873805.tar.zst wallabag-705250b93dc71ae91d3c305b51e7a20611873805.zip |
fixes with new session class
Diffstat (limited to 'inc')
-rw-r--r-- | inc/3rdparty/Session.class.php | 2 | ||||
-rw-r--r-- | inc/poche/Poche.class.php | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/inc/3rdparty/Session.class.php b/inc/3rdparty/Session.class.php index 08126bad..df913a06 100644 --- a/inc/3rdparty/Session.class.php +++ b/inc/3rdparty/Session.class.php | |||
@@ -136,7 +136,7 @@ class Session | |||
136 | */ | 136 | */ |
137 | public static function logout() | 137 | public static function logout() |
138 | { | 138 | { |
139 | unset($_SESSION['uid'], $_SESSION['ip'], $_SESSION['expires_on']); | 139 | unset($_SESSION['uid'],$_SESSION['ip'],$_SESSION['expires_on'],$_SESSION['tokens'], $_SESSION['login'], $_SESSION['pass'], $_SESSION['poche_user']); |
140 | } | 140 | } |
141 | 141 | ||
142 | /** | 142 | /** |
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 2f0f7038..8770c7f7 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -331,16 +331,7 @@ class Poche | |||
331 | if ($user != array()) { | 331 | if ($user != array()) { |
332 | # Save login into Session | 332 | # Save login into Session |
333 | Session::login($user['username'], $user['password'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']), array('poche_user' => new User($user))); | 333 | Session::login($user['username'], $user['password'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']), array('poche_user' => new User($user))); |
334 | |||
335 | $this->messages->add('s', _('welcome to your poche')); | 334 | $this->messages->add('s', _('welcome to your poche')); |
336 | if (!empty($_POST['longlastingsession'])) { | ||
337 | $_SESSION['longlastingsession'] = 31536000; | ||
338 | $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; | ||
339 | session_set_cookie_params($_SESSION['longlastingsession']); | ||
340 | } else { | ||
341 | session_set_cookie_params(0); | ||
342 | } | ||
343 | session_regenerate_id(true); | ||
344 | Tools::logm('login successful'); | 335 | Tools::logm('login successful'); |
345 | Tools::redirect($referer); | 336 | Tools::redirect($referer); |
346 | } | 337 | } |