Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
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: 329
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: 11,468
Website GitHub

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: 329
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
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

kuo_user_last_action fills this need rather nicely

Offline

Board footer

Powered by FluxBB