User login

  • Thread starter Thread starter Wayne Gibson
  • Start date Start date
W

Wayne Gibson

Hi,
Was wondering if anybody could help.

I'm looking for a way for a user to sign in only once, so that they can't
sign in again on another machine or browser.
But I also need to handle automatically signing out the user if they don't
sign out correctly..

Anybody got any ideas?

Many thanks

Wayne
 
I'm looking for a way for a user to sign in only once, so that they can't
sign in again on another machine or browser.

That's easy - use a database. When they sign in, set a flag against their
login ID (or whatever), or write a record containing their login ID (or
whatever) to a table of currently logged in users. Every time a user tries
to log in, check against the database.
But I also need to handle automatically signing out the user if they don't
sign out correctly..

That's not so easy, and largely depends what you mean by "sign out
correctly". One way would be to unset the logged-in flag on Session_End and
provide a Logout button which tears down the Session. However, if they just
close their browser without logging out "correctly", then they won't be able
to log back in again until their Session has timed out automatically which,
by default, is after 20 minutes of inactivity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top