[rt-users] Logging Logins to Database

Schultz, Eric ESchultz at corp.untd.com
Fri Jan 13 13:13:09 EST 2006


Not exactly answering your question, but are you sure this is the best
way to see which users are still active?  We have more users here that
only use the system by email rather than the web interface, but they
will still need or want to log in via the web on occasion.  Do you want
to determine whether a user is active solely by web login?

But when the user logs in, I believe that is checked in
lib/RT/User_Overlay.pm.  I hacked the IsPassword sub here to check a
different database first for authentication.  And it looks like this
value gets passed back to share/html/autohandler.  You could probably
grab the global DB handle to run your own statements after you figured
out whether or not they authenticated successfully.

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Jason
Hane
Sent: Friday, January 13, 2006 9:43 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Logging Logins to Database

I created a new field in the Users table called LastLogin that takes a
timestamp.  I would like to write to that field every time a user logs
in.  This would help in seeing which privileged users are still active.
I've been searching through the code looking for the procedure that
performs the authentication with no luck.  I don't see anywhere in the
code where it makes database calls.  How can I update that field when a
user logs in?

Thanks,
Jason



More information about the rt-users mailing list