From a21739aae5daece7098652a0f7f8b7fd36b8fcc6 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 21 Oct 2011 16:03:41 -0500 Subject: Add LastLogin column to Users table Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 087aea3..969fb60 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -637,8 +637,11 @@ function try_login() { } if ($logged_in) { - # set our SID cookie + $q = "UPDATE Users SET LastLogin = UNIX_TIMESTAMP() "; + $q.= "WHERE ID = '$userID'"; + db_query($q, $dbh); + # set our SID cookie if (isset($_POST['remember_me']) && $_POST['remember_me'] == "on") { # Set cookies for 30 days. -- cgit v1.2.3-70-g09d2