Automatic log out after 10 minutes

Top  Previous  Next

We're often asked about adding a feature that will automatically log out the last operator if the computer is inactive for a period of time.  In version 4.0 and later, this can be done by adding a simple Event Action.  This example will log out after 10 minutes, but you can change the time by altering the number of seconds in the function.

 

1. To add this feature, go to Maintenance / Advanced Customizations / Event Actions.

 

2. Click Add Event Action.

 

3. Enter an Action Name, like "Logout after 10 minutes".

 

4. For the Event Trigger, select "Each Minute".

 

5. For the Condition, enter the following (all in one line -- if this shows it as multiple lines, enter it continuously without pressing Enter).

 

CurrentOpLevel() > 0 AND !IsAnyDialogOpen() AND (SecondsInDate() - SecondsInDate(TimeOfLastInput())) > 600

 

Note: Spacing is critical, it must be typed EXACTLY as shown, for instance with spaces on each side of the AND's and the operators (- and >), but no spaces anywhere else.

 

What this does is make sure someone is already logged in, no dialogs are currently open, and it has been 600 seconds or more since the last time any mouse movement or key pressed.

 

6. For the Action expression, enter:

 

LogOut()

 

7. Click Save, then Close to exit Event Actions Setup.

 

Note that since this event is only checked each minute, the actual inactivity delay may be anywhere from 10 to 11 minutes.  You could make it trigger each second, but that would result in more overhead than necessary for something that doesn't need to be so precise.

 

 


Page URL http://CampgroundMaster.com/help/automaticlogoutafter10minu.html

Campground Master Home