Re: [Phplib-users] Logged user on an unsecured page
Brought to you by:
nhruby,
richardarcher
From: Andreas I. <an...@sp...> - 2005-03-18 21:23:53
|
Hello Eduardo, AFAIK there is no feature like this in the lib. I Have 3 ideas: 1. login_table * create a new table with user_id, login_time (timestamp), sess_id * extend the auth class method auth_validatelogin() method -->write logindata into this new table the data if login is successful * extend the logout features in a similar way like above * write an analyse function/class for the data ** join the sessions table on sess_id and the user_table on user_id *** gets logintime from the new table, and last "action" time from session table and username from user_table -->maybe this will produce some "dead" database entries, because of users not logged out and sessions garbage_collection 2. inspired by phpslash (http://sourceforge.net/projects/phpslash/) -->similar procedure as above, but in phpslash there is still a function logwrite('LOGITEM', 'LOGDATA (browser, ip, whatever you wish)') --->maybe this is not reliable, for timed out sessions 3. usage of phpopentrackers (http://phpopentracker.de/en/index.php) current_activity feature * of course phpopentracker is a powerful tool, which can log much more, but it is possible to setup what to log ** extend the auth class and log only if auth_validatelogin is successful= l -->this is easy to implement, but not really reliable, because current_activity times out after 3 minutes -->the advance of this idea is, you know there your users are I think a mixture of 1 and 2 is best. Have fun Andreas PS: maybe this feature is worth to put into cvs, when it is approved an tested :) Eduardo Andr=E9s Alfonso Sierra schrieb: > Hi > > For logging purposes I want to know who's logged on my system even on > an unsecured page. Is it possible ?? How do I do that ?? > > I've tried many way but the $sess, $user and $auth variables are never > recognized on unsecured pages. > > How should I salution that ? > > Thanks in Advance > > Eduardo Alfonso > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Phplib-users mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phplib-users > > =20 > |