From: Andrew Dolgov Date: Fri, 17 Mar 2006 02:55:38 +0000 (+0100) Subject: login: redirect to main page if user is already logged in X-Git-Tag: schema_freeze_for_1.1.4~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a5ebd1f97493318313cbf1435a6e1a7b73a5c935;p=tt-rss.git login: redirect to main page if user is already logged in --- diff --git a/login.php b/login.php index 59340d21..28afaad7 100644 --- a/login.php +++ b/login.php @@ -19,6 +19,14 @@ $login = $_POST["login"]; $password = $_POST["password"]; + if ($_COOKIE["ttrss_sid"]) { + require_once "sessions.php"; + if ($_SESSION["uid"]) { + initialize_user_prefs($link, $_SESSION["uid"]); + header("Location: $redirect_base/tt-rss.php"); + } + } + if ($login && $password) { if ($_POST["remember_me"]) {