Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2014-04-04 10:16:19

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,207

Re: More granularity on user last login Date...

fiddle wrote #280055:

Never gets marked with a date

I.e. you have March in your admin right now, log out, log back in, visit the Users panel and there’s still March? That’d be weird.

You can install one of these dashboard plugins (e.g. smd_tabber) and put a query tag with a nicely formatted date there.
You might also hack the core. I did that once for these dates, it’s not too tough cause I could do it. But it didn’t survive the update and was never re-ordered.

Edit: Umm, wait, you’re not calling for more granularity like the others, you complained about TXP not working as it should, right? Did you try to deactivate the above plugins and test then? Do any of these have their own DB tables and override the system one’s? Then lay a cable from there into your dashboard.

Last edited by uli (2014-04-04 10:21:29)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#12 2014-04-04 10:41:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,679
Website

Re: More granularity on user last login Date...

fiddle wrote #280055:

some accounts are logged, others are not..

smd_user_manager piggy backs on top of the core tables so shouldn’t affect the outcome here. Are you logging in from the admin side or from the fronrt-end via cbe_*? I presume that the cbe plugins use core functions to log you in and out, which should take care of the last access time. Maybe they don’t…?

Can you check if the last_access column is being updated at all in the txp_users table in the database? If not, any error messages in server logs?


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

#13 2014-04-04 14:07:11

fiddle
Member
Registered: 2007-10-03
Posts: 87

Re: More granularity on user last login Date...

One account is on thebackend, which is fine, then ihave about 10 accounts in the front through cbe.. Only 2 of the 10 gets loggedat all. That’s why I find it weird, itshould either work, or not at all..
Ill look at the db table when iget a chance.. But like I said, itworks for certain accounts, so it is getting updated,sometimes….
Thanks for the help..

Offline

#14 2014-04-04 17:59:07

Gocom
Plugin Author
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,532
Website

Re: More granularity on user last login Date...

fiddle wrote #280082:

One account is on thebackend, which is fine, then ihave about 10 accounts in the front through cbe.

That explains it. It’s a plugin provided feature, and thus unrelated to the core functionality. cbe_frontauth versions prior to 0.9.5 just don’t update the date on log in.

Bloke wrote #280066:

I presume that the cbe plugins use core functions to log you in and out, which should take care of the last access time. Maybe they don’t…?

There aren’t really any features for handling logins and session in Textpattern 4.5 and older. Textpattern has just a total of one function for all that, and that one is for validating credentials. For some odd reason that function also updates last-access time on successful validation: old-school slap-on code in other words.

Rest of the old codebase is useless outside admin-side and actually leads to security vulnerabilities if run elsewhere by plugins. The private login cookie for example itself becomes domain-wide.

I personally wouldn’t recommend using Textpattern 4.5 session functions otherwise either for anything actually mission critical (i.e. as a login backend). The public login cookie is 10 bytes long substring of md5 hash, for example (note: the private cookie and admin-side login system is unrelated and fine).

Offline

#15 2016-07-16 13:31:03

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

Re: More granularity on user last login Date...

Was a solution ever found for this?

Offline

#16 2016-07-17 07:40:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,679
Website

Re: More granularity on user last login Date...

towndock wrote #300310:

Was a solution ever found for this?

No. If you choose to ‘remember’ your admin-side login credentials, the cookie lasts for thirty days and automatically logs you back in, so the best granularity we have is that. Hence, last_login is of the same order.

Not sure how to get round it, short of removing the cookie functionality or finding a way for it to update the DB every time it’s used.


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

#17 2016-07-17 10:31:36

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

Re: More granularity on user last login Date...

Bloke wrote #300313:

finding a way for it (cookie) to update the DB every time it’s used.

If that was possible… that would solve it.

Other possibility (if the database knows)… last user activity. If the user has done anything, published or updated an article, etc.

Your cookie idea would be the best.

Offline

#18 2016-07-18 16:01:43

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

Re: More granularity on user last login Date...

kuo_user_last_action fills this need rather nicely

Offline

Board footer

Powered by FluxBB