summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aurweb/routers/sso.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/aurweb/routers/sso.py b/aurweb/routers/sso.py
index 7b9c67c8..817adadb 100644
--- a/aurweb/routers/sso.py
+++ b/aurweb/routers/sso.py
@@ -63,7 +63,13 @@ def open_session(request, conn, user_id):
SessionID=sid,
LastUpdateTS=time.time(),
))
- # TODO update Users.LastLogin and Users.LastLoginIPAddress
+
+ # Update user’s last login information.
+ conn.execute(Users.update()
+ .where(Users.c.ID == user_id)
+ .values(LastLogin=int(time.time()),
+ LastLoginIPAddress=request.client.host))
+
return sid