Re: Re: [PEAR-DEV] 2 questions about LiveUser

From: Date: Sat, 11 Sep 2010 00:20:57 +0000
Subject: Re: Re: [PEAR-DEV] 2 questions about LiveUser
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53801@lists.php.net to get a copy of this message
On 07.09.2010 16:13, Matthias Nothhaft wrote:
As it is old PHP 4 code I would not use it anymore.. but if it is ok for you then it's ok for me ;-)
Hehe, good. I am not very PHP experienced, so hope I'll find time to get to know PHP5 OOP better =)
1. I do not want one user to be able to be logged in from multiple computers/sessions simultanously. Say one username is logged in on computer 1, and the same username logs in from computer 2. Then would like computer 1 to be automatically logged off. Is this possible to achieve?
This is a bit tricky.. [...]
Thanks for the suggestions! Sounds like a doable solution. I'll check it out.
2. As a security measure I want to log successful and unsuccessful logins/logouts to a mysql table (handle, date/time, ip, event). I am not so familiar with PEAR, and have tried to configure the Log and Event Dispatcher classes for this, with no luck. Any suggestions on how to get this configuration to work?
You need to create a table and "manually" insert records on submit of the login form. I don't know of any way to automatically do this using Log/Event_Dispatcher.
Made a simple log that shows the login history, and also a list of active sessions (by logging logouts, and the time for last activity - comparing with idle- and expire settings). Works great. Thanks for your know-how and suggestions Matthias, nice to know the best possible solution before I try to find one ;) Best Regards, Axel

« previous php.pear.dev (#53801) next »