RE: [phplib] current users? From: Brian Popp (bpopp <email protected>)
Date: 08/22/01

I added a TIMEDATE field to my Users table that keeps track of the last
authentication. That way I can show a list of all the registered users and
the last date and time they were active. Sorted in descending order, it
gives you a nice idea of who is actively using your site. A counter tracking
number of logins is nice, too. Of course, as has been said, non-registered
users can only be queried by looking at the active_sessions table which is
iffy at-best.

bpopp - bpopp.net

-----Original Message-----
From: Kristian Koehntopp [mailto:kris <email protected>]
Sent: Wednesday, August 22, 2001 4:06 AM
To: Bryan McGuire
Cc: tps <email protected>; Michael Chaney; phplib <email protected>
Subject: Re: [phplib] current users?

On Tue, Aug 21, 2001 at 10:32:21PM -0700, Bryan McGuire wrote:
> Due to the stateless nature of http, this is dodgy at best. You
> understand this, and you need to educate your client on the nature of
> http and its limitations. Suppose that I am browsing an online store
> and the phone rings.

While you cannot tell who is currently "online" due to the
stateless nature of http, you could in theory tell which users
currently have valid authentications. PHPLIB does not properly
support this, though, because this is a vertical query and
PHPLIB keeps authentication data in a unstructured session BLOB
which does not lend itself well to any kind of vertical query.

We already had a similar discussion a few weeks ago on this
list.

If you want to be able to answer such questions as "how many
users are currently authenticated", you need to keep
authentication data outside of the session BLOB in a structured
table. Only then you will be able to run vertical queries on
such data efficiently. This is effectively a major rewrite of
Auth, or a very large subclass of Auth.

Kristian

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>

-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>