authenticate_user always returns true in SINGLE_USER_MODE
This commit is contained in:
parent
3ac2b52019
commit
131b01b336
|
@ -836,6 +836,8 @@
|
|||
|
||||
function authenticate_user($link, $login, $password) {
|
||||
|
||||
if (!SINGLE_USER_MODE) {
|
||||
|
||||
$pwd_hash = 'SHA1:' . sha1($password);
|
||||
|
||||
$result = db_query($link, "SELECT id,login,access_level FROM ttrss_users WHERE
|
||||
|
@ -861,6 +863,13 @@
|
|||
|
||||
return false;
|
||||
|
||||
} else {
|
||||
|
||||
$_SESSION["uid"] = 1;
|
||||
$_SESSION["name"] = "admin";
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function make_password($length = 8) {
|
||||
|
|
Loading…
Reference in New Issue