mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Update last login information on SSO login
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
9290eee138
commit
202ffd8923
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue