1
0
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:
Nicolas Lœuillet 2013-09-20 09:32:49 +02:00
parent 0d64be15de
commit 705250b93d
2 changed files with 1 additions and 10 deletions

View File

@ -136,7 +136,7 @@ class Session
*/ */
public static function logout() 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']);
} }
/** /**

View File

@ -331,16 +331,7 @@ class Poche
if ($user != array()) { if ($user != array()) {
# Save login into Session # Save login into Session
Session::login($user['username'], $user['password'], $_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']), array('poche_user' => new User($user))); 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')); $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::logm('login successful');
Tools::redirect($referer); Tools::redirect($referer);
} }