]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: default to admin username when logging in in single user mode
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 7 Feb 2011 10:38:03 +0000 (13:38 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 7 Feb 2011 10:38:03 +0000 (13:38 +0300)
api/index.php

index 090493b27eaa804793d088bfa4edeed9cdb0fd1c..babd50a0779c10c72a9ba0bdfce9c8f7debaec48 100644 (file)
@@ -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,