On the other hand, if Output: After using session_unset() function: This function destroys the variables like ‘name’ and ’email’ which are using. Hello. session_destroy is destroy the Hopefully, you found this logout tutorial helpful! PHP Sessions are not authentication or reliable data access control mechanisms. Session Configuration Session configuration is generally defined in /config/app.php.The available options are: Session.timeout - The number of minutes before CakePHP’s session handler expires the session. In this tutorial, I will show you how to automatically logout from system if user is inactive from last 15 minutes in php programming language. Login and Logout Panel with Session and restriction of file (can’t access ) if not Login: Step 1: Create the Login Form (index.php)