Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28256 closed Bug (invalid)

Django `update_last_login` always providing lastest time. not last login time

Reported by: Vinay Kumar Owned by: nobody
Component: contrib.auth Version: 1.11
Severity: Normal Keywords: last_login
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have logged into my site 1 days ago but today when I log into my site, it is showing today date in user.last_login.
user.last_login should have yesterday date.

code location.
https://github.com/django/django/blob/a3ba2662cdaa36183fdfb8a26dfa157e26fca76a/django/contrib/auth/models.py#L20

Change History (1)

comment:1 by Marten Kenbeek, 7 years ago

Resolution: invalid
Status: newclosed

last_login refers to the time of the last successful login action, not to the time of the last user session. As mentioned on your StackOverflow question, if you check the value for the current user, that will be the start time of the current session, not the start time of the previous session.

Version 0, edited 7 years ago by Marten Kenbeek (next)
Note: See TracTickets for help on using tickets.
Back to Top