Well, this is the basic scenario.

The same userid cannot be logged into the app more than once at any given
time.  Also, we want to use a cookie to keep the user from having to explicitly
login everytime.

The latter will be accomplished with cookies and the first rule will be
enforced with a "loggedin" flag in the database.  My problem lies in the user
not explicitly clicking logout when they leave the site.  If they explicitly
click logout, i can change the "loggedin" flag to false so that they can enter
again the next time they try.

However, if they do not explicitly logout, I cannot fire the code to change the
flag in the database.

So basically I want to set a cookie that will allow them to enter the site
under their userid, but I can't allow them to enter if they are currently
logged in from elsewhere.

Any ideas?

Trey

Tim Bishop wrote:

> On Mon, 20 Nov 2000, Bill Moseley wrote:
>
> > At 03:00 PM 11/20/00 -0600, Trey Connell wrote:
> > >Is there anyway to know that a user has disconnected from their session
> > >through network failure, power off, or browser closure?
> >
> > How is that different from just going out for a cup of coffee or opening a
> > new browser window and looking at a different site?
> >
> > >I am logging
> > >information about the user to a database when they login to a site, and
> > >I need to clean up this data when they leave.
> >
> > Define "leave" and you will have the answer.
> >
> > All you can do is set an inactivity timeout, I'd suspect.  cron is your
> > friend in these cases.
>
> And spec out what you want when a user does happen to come back after you
> have expired their session with cron.  (they leave their browser open for
> awhile, or they bookmark a page).
>
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to