}
}
- if ($_SESSION["cookie_lifetime"] && $_SESSION["uid"]) {
+/* if ($_SESSION["cookie_lifetime"] && $_SESSION["uid"]) {
//print_r($_SESSION);
if (time() > $_SESSION["cookie_lifetime"]) {
return false;
}
- }
+ } */
+
return true;
}
}
}
+ if ($_COOKIE["ttrss_sid"]) {
+ require_once "sessions.php";
+ }
+
if (!validate_session($link)) {
logout_user();
render_login_form($link);
$password = $_POST["password"];
$remember_me = $_POST["remember_me"];
+ if ($remember_me) {
+ session_set_cookie_params(SESSION_COOKIE_LIFETIME_REMEMBER);
+ } else {
+ session_set_cookie_params(SESSION_COOKIE_LIFETIME);
+ }
+
+ require_once "sessions.php";
+
if (authenticate_user($link, $login, $password)) {
$_POST["password"] = "";
if ($remember_me) {
$_SESSION["cookie_lifetime"] = time() +
SESSION_COOKIE_LIFETIME_REMEMBER;
- } else if (SESSION_COOKIE_LIFETIME > 0) {
+ } else if (SESSION_COOKIE_LIFETIME) {
$_SESSION["cookie_lifetime"] = time() + SESSION_COOKIE_LIFETIME;
}
}
} else {
+ require_once "sessions.php";
return authenticate_user($link, "admin", null);
}
}
<?php
- require_once "sessions.php";
+// require_once "sessions.php";
require_once "sanity_check.php";
require_once "functions.php";
require_once "config.php";
<?php
require_once "functions.php";
- require_once "sessions.php";
+// require_once "sessions.php";
require_once "sanity_check.php";
require_once "version.php";
require_once "config.php";
session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
}
- session_set_cookie_params(SESSION_COOKIE_LIFETIME_REMEMBER);
+// session_set_cookie_params(SESSION_COOKIE_LIFETIME_REMEMBER);
session_start();
?>
<?php
require_once "functions.php";
- require_once "sessions.php";
+// require_once "sessions.php";
require_once "sanity_check.php";
require_once "version.php";
require_once "config.php";
<?php
- require_once "sessions.php";
+// require_once "sessions.php";
require_once "sanity_check.php";
require_once "functions.php";