summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-07-28 14:32:09 +0400
committerAndrew Dolgov <[email protected]>2010-07-28 14:32:09 +0400
commita7a9968684dca544e46e6da5338c9a452b1d8f24 (patch)
tree2d06504ede344d45516e35c8edc7ab0f9f89e41c /api
parent423e6e55d7c022e1efa1f171fd5c09caf8f01518 (diff)
api: properly handle incorrect UID passed to login
Diffstat (limited to 'api')
-rw-r--r--api/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/index.php b/api/index.php
index 64e9741a3..8d69e1a73 100644
--- a/api/index.php
+++ b/api/index.php
@@ -61,7 +61,7 @@
$uid = 0;
}
- if (get_pref($link, "ENABLE_API_ACCESS", $uid)) {
+ if ($uid && get_pref($link, "ENABLE_API_ACCESS", $uid)) {
if (authenticate_user($link, $login, $password)) {
print json_encode(array("session_id" => session_id()));
} else {