Jump to content

Using timeout


rascle

Recommended Posts

Hi

I am trying to create a "User logged" function that tells the database when the user was logged in, I have heard about creating a time out for this, but dont have any idea how to do it or what it does!

Any one have any ideas?

Thanks

Rhys

Link to comment
Share on other sites

Theres no "time out" per say, not automatic at least (i don't think, i could be wrong). Only way to really do something is upon login set a DATETIME style timestamp somewhere. Be it via session, in a column on the table, whatever. And while the user is active have it regularly update that timestamp. But only updating it if the one stored however you stored it is still less than the current time. Or set timestamp 15 or 20 minutes in the future and if the time() now is greated than the time stamp stored the login expires, and the timestamp doesnt update.

 

I know this is all a bit vague, but im half asleep right now waiting on help to something I am stuck on. Hopefully I make more sense then I think I am currently being tired like this and trying to make sense is a bad combination. Anyway good luck

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.