diff options
author | Andrew Dolgov <[email protected]> | 2005-11-18 07:21:24 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-18 07:21:24 +0100 |
commit | c8437f35c62f0ad12eee5d4b2ac075c44d7ed2c7 (patch) | |
tree | 6b8c41f78785dc2ff6a35c09fa600b82597cf400 /tt-rss.php | |
parent | 1c7f75ed2c8e0c914bba2134158e483aa1c3af40 (diff) |
optional login form/http basic auth support
Diffstat (limited to 'tt-rss.php')
-rw-r--r-- | tt-rss.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tt-rss.php b/tt-rss.php index 7b6b11b48..9348944f6 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -8,10 +8,14 @@ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - authenticate_user($link); - -// $_SESSION["uid"] = PLACEHOLDER_UID; // FIXME: placeholder -// $_SESSION["name"] = PLACEHOLDER_NAME; + if (!USE_HTTP_AUTH) { + if (!$_SESSION["uid"]) { + header("Location: login.php"); + exit; + } + } else { + authenticate_user($link); + } initialize_user_prefs($link, $_SESSION["uid"]); // FIXME this needs to be moved somewhere after user creation |