#554: "Last Login" does not update
-----------------------+----------------------------
Reporter: rjollos | Owner: rjollos
Type: defect | Status: accepted
Priority: critical | Milestone: Release 6
Component: plugins | Version: 0.5.3
Resolution: | Keywords: AccountManager
-----------------------+----------------------------
Comment (by astaric):
I can confirm, that last_visit does not update after each login.
However, both setups (bloodhound and trac) with the login options I tested
(!AccountManager, --auth, --basic-auth) behave in the same way,
"last_visit" time is only updated when
- session is created for the first time (first login)
- when session data is modified and sufficient amount of time has passed.
Only the first loggin satisfies this requirements and (in every setup I
have tried) creates a session record with last_visit filled in. The
following logins do not automatically modify the last_visit field.
My guess is that last_visit was not ment to be used as "Last login" time,
but as a helper to decide, when the session data can be removed from the
database. I based my observation on the comment just before the code that
updates the last_visit time.
{{{
# Purge expired sessions. We do this only when the session was
# changed as to minimize the purging.
}}}
As long as the admin panel reads data from Session.last_visit, column
caption "Last Login" is misleading.
We could touch the session data after each successful login, which would
keep this field (more) up to date, but the real solution would probably be
to store logins in a separate table. If we consider this an important
issue, we could propose a patch to !AccountManager or hack around to
manually update the last_visit time.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/554#comment:17>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker