From a5ebd1f97493318313cbf1435a6e1a7b73a5c935 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Mar 2006 03:55:38 +0100 Subject: [PATCH] login: redirect to main page if user is already logged in --- login.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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"]) { -- 2.39.5