Automatic Logout

Hi Everyone!

I was wondering if there is someone that can assist me in the following,

I want to create a code “automatic logout if user has idled more than 5 minutes” redirect back to login page.

Also on what application will you use it, control or menu?

Regards
Jacques

Re: Automatic Logout

The easiest way is to setup PHP settings to defer to login form using cookie settings or you PHP.ini.

If you want ‘auto’ redirect, then you will need to setup something in JS as a timer.
I would suggest the first approach, PHP, to where they are redirected if they are idle for 5+ min and try to access something.

login: create session var
in app init: function to check for session var and redirect to login if not found.

Regards,
Scott.

Is the problem with this not as follows:

  • if you check in app init, only the app will log out leaving the menu app showing, which is awkward.

  • if you check in menu app onExecute, it will only work when next menu item is clicked by user

  • if you check elsewhere in menu app, then if user does not do anything within menu screen area it will trigger

So one has to do in both?