api: properly handle incorrect UID passed to login

This commit is contained in:
Andrew Dolgov 2010-07-28 14:32:09 +04:00
parent 423e6e55d7
commit a7a9968684
1 changed files with 1 additions and 1 deletions

View File

@ -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 {