Commit 202ffd89 authored by Frédéric Mangano-Tarumi's avatar Frédéric Mangano-Tarumi Committed by Lukas Fleischer
Browse files

Update last login information on SSO login


Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 9290eee1
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment