]> git.wh0rd.org Git - tt-rss.git/commitdiff
login: redirect to main page if user is already logged in
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 17 Mar 2006 02:55:38 +0000 (03:55 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 17 Mar 2006 02:55:38 +0000 (03:55 +0100)
login.php

index 59340d21d7a3e64536ee6920ac5f68c67afac574..28afaad715791478072b0f550a6f5c219d8317d9 100644 (file)
--- a/login.php
+++ b/login.php
        $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"]) {