diff --git a/api.php b/api.php index 3fd9230..d63a51b 100644 --- a/api.php +++ b/api.php @@ -72,15 +72,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (isset($_GET['session'])) { - if (custom_has_auth_cookie()) { - custom_json(['authenticated' => true, 'admin' => custom_auth_cookie_is_admin()]); - } - if (custom_is_site_admin()) { custom_issue_auth_cookie(true); custom_json(['authenticated' => true, 'admin' => true]); } + if (custom_has_auth_cookie()) { + custom_json(['authenticated' => true, 'admin' => false]); + } + custom_json(['authenticated' => false, 'admin' => false]); }