From: Andrew Dolgov Date: Mon, 7 Feb 2011 10:38:03 +0000 (+0300) Subject: api: default to admin username when logging in in single user mode X-Git-Tag: 1.5.2~43 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4909f981ce3a7b4029abb41ccaf58c6e651b26b1;p=tt-rss.git api: default to admin username when logging in in single user mode --- diff --git a/api/index.php b/api/index.php index 090493b2..babd50a0 100644 --- a/api/index.php +++ b/api/index.php @@ -78,6 +78,8 @@ $uid = 0; } + if (SINGLE_USER_MODE) $login = "admin"; + if ($uid && get_pref($link, "ENABLE_API_ACCESS", $uid)) { if (authenticate_user($link, $login, $password)) { // try login with normal password print api_wrap_reply(API_STATUS_OK, $seq,