Date: 08/22/01
- Next message: Layne Weathers: "Re: [phplib] current users?"
- Previous message: Brian Popp: "RE: [phplib] current users?"
- In reply to: Brian Popp: "RE: [phplib] current users?"
- Next in thread: Layne Weathers: "Re: [phplib] current users?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
For me this is just a point of the iceberg.
Because after wanting to know how many users are online, you'll
legitimately want to know also how much did that user stayed logged in,
or the average login time of users, or how frequently users login, and
other interesting info that you can only get by using a login/logout
logtable.
Then a question could be: how do I know when actually someoe logged out?
there isn't in fact a 'logout' action, I mean and obligate one. Logins
simply expire. I am not sure of this, but when you fin a login record,
in that logi/logout logtable, that has no accompanying logout record,
and the login time is more than expire time,, you can cosider him logged
out.
I don't know if this makes sense. Otherwise a garbage-collection-like
run, that automatically write logout record to that table for user whose
login time is exipired
Giancarlo
Brian Popp wrote:
>
> 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>
-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>
- Next message: Layne Weathers: "Re: [phplib] current users?"
- Previous message: Brian Popp: "RE: [phplib] current users?"
- In reply to: Brian Popp: "RE: [phplib] current users?"
- Next in thread: Layne Weathers: "Re: [phplib] current users?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

