1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00

Installation mode

This commit is contained in:
Nicolas Lœuillet 2013-05-31 22:55:52 +02:00
parent baa8617364
commit aa8c9f2a32
8 changed files with 124 additions and 10 deletions

View file

@ -25,9 +25,14 @@ $ref = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
if (isset($_GET['login'])) {
// Login
if (!empty($_POST['login']) && !empty($_POST['password'])) {
if (Session::login('poche', 'poche', $_POST['login'], $_POST['password'])) {
// echo $_SESSION['login']."<br>";
// echo $_SESSION['pass']."<br>";
// echo $_POST['login']."<br>";
// echo encode_string($_POST['password'] . $_POST['login']);
// die;
if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], encode_string($_POST['password'] . $_POST['login']))) {
logm('login successful');
$msg->add('s', 'welcome in your pocket!');
$msg->add('s', 'welcome in your poche!');
if (!empty($_POST['longlastingsession'])) {
$_SESSION['longlastingsession'] = 31536000;
$_SESSION['expires_on'] = time() + $_SESSION['longlastingsession'];