How to achieve auto logoff in php ?

Posted by Ramakrishnan on Stack Overflow See other posts from Stack Overflow or by Ramakrishnan
Published on 2010-05-25T17:14:05Z Indexed on 2010/05/25 17:21 UTC
Read the original article Hit count: 280

Filed under:

I need auto-logoff system in my application.

if user not using the application more than thirty minutes.they should log in again.

this is what i need. lastAccessTime should be lesser than 30 minutes. if lastAccessTime exceeds than 30 minutes user should login again with their credentials.

(currently i auto log off using Lastaccesstime field in My user table (database) and compare lastaccesstime with current time for every page loads, I do not think this is right way.)

is their any way to achieve? Thanks in advance.

© Stack Overflow or respective owner

Related posts about php