From f4ab62c4ff1f4b99854c3ca888cb8b1314c73d95 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 3 Jan 2018 21:53:42 -0700 Subject: [PATCH] Fix ismanagerof API not detecting "uid" flag properly --- api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.php b/api.php index b89bbde..590de51 100644 --- a/api.php +++ b/api.php @@ -6,7 +6,7 @@ /** * Simple JSON API to allow other apps to access accounts in this system. - * + * * Requests can be sent via either GET or POST requests. POST is recommended * as it has a lower chance of being logged on the server, exposing unencrypted * user passwords. @@ -160,7 +160,7 @@ switch ($VARS['action']) { } break; case "ismanagerof": - if ($VARS['uid'] === 1) { + if ($VARS['uid'] == "1") { if ($database->has("accounts", ['uid' => $VARS['manager']])) { if ($database->has("accounts", ['uid' => $VARS['employee']])) { $managerid = $VARS['manager']; @@ -399,4 +399,4 @@ switch ($VARS['action']) { /* } catch (Exception $e) { header("HTTP/1.1 500 Internal Server Error"); die("\"500 Internal Server Error\""); - } */ \ No newline at end of file + } */ \ No newline at end of file