summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-01 19:32:27 +0300
committerAndrew Dolgov <[email protected]>2021-03-01 19:32:27 +0300
commit8b1a2406e61952fb8c26c8430a13db1093188702 (patch)
tree255f7b38837c833e1b901bdab9d0b0004f45edd9 /classes/feeds.php
parent127a868e4033a66c03ba18128697a8702cc484e7 (diff)
userhelper: use orm for a few more user-related things
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 55a71aebb..bf165f93a 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -474,8 +474,9 @@ class Feeds extends Handler_Protected {
/* bump login timestamp if needed */
if (time() - $_SESSION["last_login_update"] > 3600) {
- $sth = $this->pdo->prepare("UPDATE ttrss_users SET last_login = NOW() WHERE id = ?");
- $sth->execute([$_SESSION['uid']]);
+ $user = ORM::for_table('ttrss_users')->find_one($_SESSION["uid"]);
+ $user->last_login = 'NOW()';
+ $user->save();
$_SESSION["last_login_update"] = time();
}