From: Andrew Dolgov Date: Sun, 22 Jan 2012 08:04:57 +0000 (+0400) Subject: fix login before updating to schema 88 X-Git-Tag: 1.5.10~38 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3a2c5c6642096f34f8de715d28ecf8636aaab8e1;p=tt-rss.git fix login before updating to schema 88 --- diff --git a/include/functions.php b/include/functions.php index 357fff78..f0ff2ce2 100644 --- a/include/functions.php +++ b/include/functions.php @@ -711,7 +711,7 @@ } } - } else { + } else if (get_schema_version($link) > 87) { $result = db_query($link, "SELECT salt FROM ttrss_users WHERE login = '$login'"); @@ -754,6 +754,11 @@ login = '$login' AND pwd_hash = '$pwd_hash'"; } + } else { + $query = "SELECT id,login,access_level,pwd_hash + FROM ttrss_users WHERE + login = '$login' AND (pwd_hash = '$pwd_hash1' OR + pwd_hash = '$pwd_hash2')"; } $result = db_query($link, $query);