mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
fixes with new session class
This commit is contained in:
parent
0d64be15de
commit
705250b93d
2
inc/3rdparty/Session.class.php
vendored
2
inc/3rdparty/Session.class.php
vendored
@ -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']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user