Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-22 15:16:42

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Users last login day of the month

I was just wondering if on the “Users” page the “Last Login” field could include the day of the month as well. Just having the month and year doesn’t really give much of an idea.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2009-04-22 15:29:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Users last login day of the month

thebombsite wrote:

I was just wondering if on the “Users” page the “Last Login” field could include the day of the month as well.

+1 from me. Line 323 of txp_admin.php could be changed to:

td($last_login ? safe_strftime('%d %b %Y', $last_login) : '').

at the expense of an extra 8 bytes. Or something a little more locale-friendly might be in order?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2009-04-22 15:36:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Users last login day of the month

Ha haa. I’ve just got out of hacking txplib_head.php Stef, I don’t want to start hacking something else. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2009-04-22 15:41:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Users last login day of the month

thebombsite wrote:

I’ve just got out of hacking txplib_head.php Stef

Yeah, know what you mean. I meant that it’s ludicrously easy to change in the core, should wet/ruud decide to do it. There’s no impediment to changing it as far as I can see; the only sticking point is that hardcoding the format the way I did above is likely to annoy our US chums :-) So there’s probably a better way that takes one of the date format options into account.

Last edited by Bloke (2009-04-22 15:41:56)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2009-04-22 15:53:54

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Users last login day of the month

Yep. Know what you mean. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2009-04-22 16:03:34

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Users last login day of the month

++1. knowing that someone edited the site “yesterday” as opposed to “sometime this month” is really valuable.

Offline

#7 2009-04-22 19:50:15

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Users last login day of the month

The “Remain logged in” cookie lives for a month. The last login date can therefore not be determined beyond that precision.

Offline

#8 2009-04-22 20:09:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Users last login day of the month

wet wrote:

The “Remain logged in” cookie lives for a month.

Ahhhh, that makes sense. I just never noticed it because I’ve never used the ‘remain logged in’ feature… which brings about another tiny feature request, if I may hijack this thread slightly: add a jQuery focus() call to the login box when visiting the login page, unless the cookie is set and the password has expired for some reaosn, in which case focus in the ‘password’ box (because the login has already been automatically entered).

Last edited by Bloke (2009-04-22 20:11:10)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2009-04-22 21:50:56

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Users last login day of the month

Hmmm. I never use that either. I just wonder what use it actually is beyond sloth. I mean, don’t most browsers remember logins these days anyway which means the details get filled and you just hit enter or did I miss a point somewhere?

So could that be reduced to remain logged in for a day? Or to put it another way, why do we need to remain logged in at all?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2011-10-16 18:37:41

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 329
Website

Re: Users last login day of the month

Apologies for reviving an over 2 year old thread, but I’m wondering if a fix has ever been developed to answer Stuart’s original question – adding the day (and time if possible) to the Users “Last Login” info in the Admin area.

Offline

#11 2012-11-01 04:38:33

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,092
Website Mastodon

Re: Users last login day of the month

towndock wrote:

Apologies for reviving an over 2 year old thread, but I’m wondering if a fix has ever been developed to answer Stuart’s original question – adding the day (and time if possible) to the Users “Last Login” info in the Admin area.

I’ll bump it up to 2012.

Can’t a day field be added?


…. texted postive

Offline

#12 2012-11-01 13:40:46

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Users last login day of the month

bici wrote:

Can’t a day field be added?

As Robert previously explained:

The “Remain logged in” cookie lives for a month.

The last access date is updated each time an user logs in from the login page. The login session can last for a month. This value doesn’t tell you when the user last time accessed the admin interface, but that login time. There is no accurate access date to show unless the last access time is updated on each page request (on each action) opposed to log in, or we go all bank, and timeout log in sessions on few minutes of inactivity.

For instance for me the last access date reads 2012-10-05, that’s a month ago, but I deleted an article just today.

Last edited by Gocom (2012-11-01 13:49:44)

Offline

Board footer

Powered by FluxBB