summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-21 23:03:41 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-10-24 17:57:53 +0200
commita21739aae5daece7098652a0f7f8b7fd36b8fcc6 (patch)
tree76f0e08d8316008f60d9b4179f5fa09ae51f0666 /web/lib
parente6ecdcc835e9a612e5c5842867c01f0efdceb789 (diff)
downloadaur-a21739aae5daece7098652a0f7f8b7fd36b8fcc6.tar.gz
aur-a21739aae5daece7098652a0f7f8b7fd36b8fcc6.tar.xz
Add LastLogin column to Users table
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/acctfuncs.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 087aea3b..969fb60f 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.