summaryrefslogtreecommitdiff
path: root/lib/accounts.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-10 22:18:58 +0500
committerilotterytea <iltsu@alright.party>2025-12-10 22:18:58 +0500
commitd52f035dc0138375506c49c20a92fe566761af3a (patch)
tree76e4140aad7c173b2f1b6e0e19136b5e482710c8 /lib/accounts.php
parentd3de5a44085f53d80e736b769d5145130df86645 (diff)
fix: include paths
Diffstat (limited to 'lib/accounts.php')
-rw-r--r--lib/accounts.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/accounts.php b/lib/accounts.php
index 2ddb796..36f11af 100644
--- a/lib/accounts.php
+++ b/lib/accounts.php
@@ -1,5 +1,5 @@
<?php
-include_once "config.php";
+include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/config.php";
function authorize_user(bool $required = false): bool
{
@@ -26,8 +26,6 @@ function authorize_user(bool $required = false): bool
return false;
}
- include_once "config.php";
-
$db = new PDO(CONFIG['database']['url'], CONFIG['database']['user'], CONFIG['database']['pass']);
$key = $_SERVER["HTTP_AUTHORIZATION"] ?? $_COOKIE["secret_key"];