Modify

Opened 6 years ago

Last modified 3 years ago

#4237 new enhancement

Provide more useful feedback if a user has never logged in

Reported by: fermulator Owned by: rjollos
Priority: normal Component: UserStatsMacro
Severity: normal Keywords: date time formatting
Cc: Trac Release: 0.11

Description

If a user has never logged into trac before, the session table shows a value of 0 for the last_visit column. The UserStatsMacro should present this information properly (instead of an obscure large number)

Example:

user1_logged_in_recently 2008/12/06 16:38:27 3 day(s)
user2_never_logged_in 1969/12/31 19:00:00 14222 day(s)

Attachments (0)

Change History (8)

comment:1 Changed 5 years ago by rjollos

I've done some testing by creating an account and never logging in with that user. The user does not appear in the table. Perhaps this issue has been resolved already?

comment:2 follow-ups: Changed 5 years ago by anonymous

Well if that's the case, then there needs to be a new bug that the user doesn't appear in the table unless they've logged in ...

Regardless of login status, all users should show up in the table for a one stop view to see who's logged in when.

And, as I mentioned a while ago in the original report, for those users who might have never logged in, it should say "never" instead of a "0" date (which is probably epoch 0??).

comment:3 in reply to: ↑ 2 Changed 5 years ago by rjollos

Replying to anonymous:

Regardless of login status, all users should show up in the table for a one stop view to see who's logged in when.

And, as I mentioned a while ago in the original report, for those users who might have never logged in, it should say "never" instead of a "0" date (which is probably epoch 0??).

I agree and I plan to work on this feature sometime in the next month or so, as well the other tickets for the UserStatsMacro that interest me: #4238, #4379, #5640.

comment:4 Changed 5 years ago by rjollos

See also #6142.

comment:5 Changed 5 years ago by rjollos

  • Owner changed from pedro to rjollos

comment:6 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by hieroglyph

Replying to anonymous:

Well if that's the case, then there needs to be a new bug that the user doesn't appear in the table unless they've logged in ...

Regardless of login status, all users should show up in the table for a one stop view to see who's logged in when.

And, as I mentioned a while ago in the original report, for those users who might have never logged in, it should say "never" instead of a "0" date (which is probably epoch 0??).

How do you define all users? A session record is only created after login (by Trac) or manually (by the admin if, for example, you need them to appear in the assign-to drop-list and have configured Trac for this).

I suspect the 'never logged in' user in the original example was a user with assigned permissions who had never logged in...

Anyway, I think my patch for #4379 addresses this with the _ignore_before parameter?

comment:7 in reply to: ↑ 6 Changed 3 years ago by hasienda

Replying to hieroglyph:

... How do you define all users? A session record is only created after login (by Trac) or manually (by the admin if, for example, you need them to appear in the assign-to drop-list and have configured Trac for this).

I suspect the 'never logged in' user in the original example was a user with assigned permissions who had never logged in...

Almost, but there is AccountManagerPlugin, that allows admin users to create user accounts beforehand. That new user procedure creates an entry in the session Trac db table too. Some users would even like me to give it a fake last-visit value in order to make the new users instantly available from restricted user drop-down select in /newticket (see #9252).

comment:8 Changed 3 years ago by hasienda

  • Keywords date time formatting added

Tip: UserQuery, an alternative wiki macro provided by AccountManagerPlugin doesn't show such insane values for new accounts.

Add Comment

Modify Ticket

Action
as new The owner will remain rjollos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.