Redirect to login if user inactive zend

648 Views Asked by At

I want to redirect to login page if user is inactive for 30 minutes.

Where to write the code and how? I have layout.phtml. Is it the right place to check session expired and redirect?

1

There are 1 best solutions below

3
janenz00 On BEST ANSWER

You can check user inactivity with Javascript. If you want to check this in all pages of the site, layout.phtml is the right place to insert the Javascript. Check SO threads like this - How do i detect if the user is "idle" with javascript? - for sample scripts.