get rid of openid config file
[phorkie.git] / www / secure.php
index 4b81d5963d08f7812a965d10282151c00cb5829c..e61408701f6be5be3496eddde69c76f4aaeb5281 100644 (file)
@@ -12,8 +12,14 @@ if (!isset($_SESSION['identity'])) {
 if ($GLOBALS['phorkie']['auth']['secure'] > 0 &&
     $GLOBALS['phorkie']['auth']['userlist']) {
     if (!in_array($_SESSION['identity'], $GLOBALS['phorkie']['users'])) {
-        $redirect = 'http://' . $_SERVER['HTTP_HOST'] . "/forbidden";
-        header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
+        header('HTTP/1.1 403 Forbidden');
+        $db = new Database();
+        render(
+            'forbidden',
+            array(
+                'recents'     => $db->getSearch()->listAll(0, 5, 'crdate', 'desc'),
+            )
+        );
         exit;
     }
 }