From: Andrew Dolgov Date: Fri, 18 Nov 2005 09:18:19 +0000 (+0100) Subject: handle last_login in editor/login sequence X-Git-Tag: schema_feature_freeze_for_1.1~224 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f6f321982f844c92488edf5420025b4381e53f50;p=tt-rss.git handle last_login in editor/login sequence --- diff --git a/backend.php b/backend.php index 42707b09..4d0753b8 100644 --- a/backend.php +++ b/backend.php @@ -1829,7 +1829,7 @@ "; $result = db_query($link, "SELECT - id,login,access_level + id,login,access_level,last_login FROM ttrss_users ORDER by login"); @@ -1837,9 +1837,10 @@ print "

"; print " - - "; + + + + "; $lnum = 0; @@ -1865,7 +1866,6 @@ print ""; print ""; - } else if (!$edit_uid || $subop != "edit") { @@ -1898,7 +1898,8 @@ } - + print ""; + print ""; ++$lnum; diff --git a/functions.php b/functions.php index 3985890b..c3551910 100644 --- a/functions.php +++ b/functions.php @@ -528,6 +528,9 @@ $_SESSION["name"] = db_fetch_result($result, 0, "login"); $_SESSION["access_level"] = db_fetch_result($result, 0, "access_level"); + db_query($link, "UPDATE ttrss_users SET last_login = NOW() WHERE id = " . + $_SESSION["uid"]); + return true; }
SelectLogin - Access Level
SelectUsernameAccess LevelLast login
".$line["login"]."".$line["access_level"]."".$line["last_login"]."