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/poche | |
parent | 0d64be15de12cd949fc9b9d2b8352a1815da965a (diff) | |
download | wallabag-705250b93dc71ae91d3c305b51e7a20611873805.tar.gz wallabag-705250b93dc71ae91d3c305b51e7a20611873805.tar.zst wallabag-705250b93dc71ae91d3c305b51e7a20611873805.zip |
fixes with new session class
Diffstat (limited to 'inc/poche')
-rw-r--r-- | inc/poche/Poche.class.php | 9 |
1 files changed, 0 insertions, 9 deletions
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 | } |