How long has user been inactive?

Rita Mikusch asked on September 22, 2016 20:24

I'm working on a website that has high-security, medium-security, and no-security pages.

And for the high-security pages, I want to create custom authorization code that specifically checks how long the user has been inactive ... if they have been inactive for more than X minutes, then they need to log in again.

Are there any existing fields in the API that will tell me how long the user has been inactive? Or do I need to create a custom cookie to track this information

I've been reading the API ... CurrentUserInfo has an "ObjectLastAccessed" field ... I've been wondering if this will tell me how long the user has been inactive? Logic being that the CurrentUserInfo object would be accessed every the user does anything on the website.

Thank you!

Recent Answers

Jan Hermann answered on September 22, 2016 22:42

For administration interface there is a javascript that does exactly what you are describing. It's called screenlock and with small changes you could use it on live site as well.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.