authenticate_user always returns true in SINGLE_USER_MODE

This commit is contained in:
Andrew Dolgov 2006-05-23 06:45:13 +01:00
parent 3ac2b52019
commit 131b01b336
1 changed files with 28 additions and 19 deletions

View File

@ -836,6 +836,8 @@
function authenticate_user($link, $login, $password) { function authenticate_user($link, $login, $password) {
if (!SINGLE_USER_MODE) {
$pwd_hash = 'SHA1:' . sha1($password); $pwd_hash = 'SHA1:' . sha1($password);
$result = db_query($link, "SELECT id,login,access_level FROM ttrss_users WHERE $result = db_query($link, "SELECT id,login,access_level FROM ttrss_users WHERE
@ -861,6 +863,13 @@
return false; return false;
} else {
$_SESSION["uid"] = 1;
$_SESSION["name"] = "admin";
return true;
}
} }
function make_password($length = 8) { function make_password($length = 8) {