Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Server
Tiny Tiny RSS
Commits
fbd40f5d
Commit
fbd40f5d
authored
Feb 07, 2011
by
Andrew Dolgov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: default to admin username when logging in in single user mode (fixed)
parent
4909f981
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
api/index.php
api/index.php
+2
-2
No files found.
api/index.php
View file @
fbd40f5d
...
...
@@ -70,6 +70,8 @@
$password
=
db_escape_string
(
$_REQUEST
[
"password"
]);
$password_base64
=
db_escape_string
(
base64_decode
(
$_REQUEST
[
"password"
]));
if
(
SINGLE_USER_MODE
)
$login
=
"admin"
;
$result
=
db_query
(
$link
,
"SELECT id FROM ttrss_users WHERE login = '
$login
'"
);
if
(
db_num_rows
(
$result
)
!=
0
)
{
...
...
@@ -78,8 +80,6 @@
$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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment