summaryrefslogtreecommitdiff
path: root/tt-rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'tt-rss.php')
-rw-r--r--tt-rss.php12
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