Opened 10 years ago
Last modified 8 years ago
#12302 new defect
UserQuery does not report correct login times
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | login UserQuery |
Cc: | Trac Release: | 1.0 |
Description
I'm trying to use the UserQuery macro to view login times to determine user activity. However, the login times reported are obviously wrong. Some of our most active users have login times 6 months or more in the past.
I'm using Trac 1.0 & AccountManagerPlugin 0.4.4.
Attachments (0)
Change History (11)
comment:1 Changed 10 years ago by
comment:2 follow-up: 4 Changed 10 years ago by
Hm, account manager plugin just reads from Trac db table, so there must be something going wrong with updating 'last_visit' column values in there.
Unlike with the original macro there is a way to double-check this by going to accounts admin panel provided by this plugin. Can you confirm the wrong last-login record there?
comment:3 Changed 10 years ago by
Yes, I see the exact same dates in the Users admin panel as in the UserQuery macro.
comment:4 follow-up: 5 Changed 10 years ago by
Replying to hasienda:
Hm, account manager plugin just reads from Trac db table, so there must be something going wrong with updating 'last_visit' column values in there.
From memory, I think you are correct about the problem being with Trac. I believe that last_visit
will only update when the session data is saved and last_visit
is more than 1 day old. See comments in bh:comment:10:ticket:554. We might want to try and improve the behavior in Trac.
comment:5 follow-up: 6 Changed 10 years ago by
Replying to rjollos:
From memory, I think you are correct about the problem being with Trac. I believe that
last_visit
will only update when the session data is saved andlast_visit
is more than 1 day old.
I checked this before and this is what I've seen too. However, since I got the impression that session data is saved rather often, I didn't expect some user to log-in and do anything on the site without the session getting updated.
I must be wrong than, but still have no idea how to fix it without adding code, that really should be part of Trac core; right?
comment:6 follow-up: 7 Changed 9 years ago by
Replying to hasienda:
I must be wrong than, but still have no idea how to fix it without adding code, that really should be part of Trac core; right?
We could update last_visit
in LoginModule._do_login
: browser:/tags/trac-1.1.5/trac/web/auth.py@:130#L130. Would that require a change in AccountManagerPlugin also since trac.web.auth.LoginModule
is disabled when using AccountManagerPlugin, or is trac.web.auth.LoginModule._do_login
still called in your code via inheritance?
comment:7 Changed 9 years ago by
Replying to rjollos:
We could update
last_visit
inLoginModule._do_login
: browser:/tags/trac-1.1.5/trac/web/auth.py@:130#L130.
See trac:#12100.
comment:8 follow-up: 9 Changed 9 years ago by
It seems to me that it could take an arbitrarily long time to get this incorporated into the main Trac code. Is there any reason why the AccountMangagerPlugin code can't do the updating itself? I kind of need this fix right now, not months down the road.
comment:9 Changed 9 years ago by
Replying to benjamin.weaver@…:
Is there any reason why the AccountMangagerPlugin code can't do the updating itself? I kind of need this fix right now, not months down the road.
PatchWelcome. I'll be pushing out a new release of AccountManagerPlugin, but there hasn't been much development activity lately and I doubt I'll have time to investigate this issue soon.
comment:10 Changed 9 years ago by
I have been traveling most of November. I'll take a look at the code myself, I guess.
comment:11 Changed 8 years ago by
Owner: | Steffen Hoffmann deleted |
---|
It looks like this might be a duplicate of #6419. In that case, the problem was never addressed because the reporter never followed up. I don't want that to happen here, so here is the full system information that was requested back in #6419: