System Preferences -> Safety -> Check "Log out after xx minutes of unuse" or whatever it's in English and set the time to 0
Possible to do this on Mac?
Oh, my bad, sorry
I don't have a Mac laptop so it's harder for me to help but I think you can choose from energy saving options or safety that what happens when you close the lid (sleep, shut down, log off). Take a look at those prefs
What you are looking for is in security. It doesn't log you off, but it does prompt for login. There are a number of options for time frame as well.
That isn't the same... You still need to type your password BEFORE you can log out and change user, unless you reboot everytime![]()