Jump to content

User inactivity timeout


rsanford
 Share

Recommended Posts

I inquired about this a while back and at the time could not find a solution. I need to be able to logout/ terminate a user session after it has been inactive for a given amount of time..ie. 5 minutes. Has anyone been able to achieve this?

 

Thank you!

Link to comment
Share on other sites

Hi,

 

I manage to do it...

 

1. create a .js file with this content:

 

var sessionTimeout = 11;//in seconds
var sesioncounter = 11;

function DisplaySessionTimeout()
{
           sesioncounter = sesioncounter - 1;

           if (sesioncounter >= 0)
		{
               window.setTimeout("DisplaySessionTimeout()", 1000);				
		}	
           else
           {
		   sesioncounter=sessionTimeout;
              window.location = "http://www.google.com";//in timeout redirect to google
           }
}
DisplaySessionTimeout();

 

2. attach the file to "servermodule":

step2.jpg

 

3. add this code to every form (ClientEvents--> UniEvents --> OnAjaxRequest):

step3.jpg

 

That is it... give it a try <_<

 

Maybe there is more efficient way, but for now it's working good for me... :rolleyes:

  • Upvote 1
Link to comment
Share on other sites

  • 3 years later...

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.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...