Automatic log out after 10 minutes

Top  Previous  Next

DISCLAIMER: This article involves Advanced Customizations, which can be technically challenging to get working and is not part of standard support.  This is programming and must be done precisely or the results can be unpredictable.  This information is provided as a service for those who have the technical skills to work through it -- we cannot help you solve any issues with getting it working.  For more information about Advanced Customizations, see the full documentation:

https://campgroundmaster.com/help/overview32.html

 

 

Update: As of version 6, there is a built-in automatic logout time for each Operator (see Maintenance / Park Setup / Operators, edit each operator).

 

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 https://CampgroundMaster.com/news/automaticlogoutafter10minu.html

Campground Master Home