diff options
author | Andrew Dolgov <[email protected]> | 2011-02-07 13:38:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-02-07 13:38:03 +0300 |
commit | 4909f981ce3a7b4029abb41ccaf58c6e651b26b1 (patch) | |
tree | d28cb39c8b739c423b91145eee8cd988804734aa /api | |
parent | b899847009e0bc0dc8e35cec6bba8cd72eb1bb23 (diff) |
api: default to admin username when logging in in single user mode
Diffstat (limited to 'api')
-rw-r--r-- | api/index.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/index.php b/api/index.php index 090493b27..babd50a07 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, |