diff options
author | Andrew Dolgov <[email protected]> | 2021-02-11 10:22:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-11 10:22:27 +0300 |
commit | 09e9f34bb495b435e826bce8cf716258039d4642 (patch) | |
tree | 60cdaf053a0af182cc66002790548caf09339c25 /update.php | |
parent | 7af8744c856545f62a2f24fd1a700f40b90b8e37 (diff) |
add UserHelper::find_user_by_login() and rewrite some user checks to invoke it instead of going through PDO
Diffstat (limited to 'update.php')
-rwxr-xr-x | update.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/update.php b/update.php index 0bf8f499f..56158ca48 100755 --- a/update.php +++ b/update.php @@ -502,13 +502,10 @@ Debug::log("Exporting feeds of user $user to $filename as OPML..."); - $sth = $pdo->prepare("SELECT id FROM ttrss_users WHERE LOWER(login) = LOWER(?)"); - $sth->execute([$user]); - - if ($res = $sth->fetch()) { + if ($owner_uid = UserHelper::find_user_by_login($user)) { $opml = new OPML(""); - $rc = $opml->opml_export($filename, $res["id"], false, true, true); + $rc = $opml->opml_export($filename, $owner_uid, false, true, true); Debug::log($rc ? "Success." : "Failed."); } else { |