We have an OpenCart site (ver 2.3.0.2). When a customer logs in, I want them to be forced to log out after being inactive for a specified time, e.g. 30 mins. I observe that customers are never logged out even if they are inactive for more than an hour.
On php.ini, found on root directory, I modified the timeout line:
session.gc_maxlifetime = 3600;
I placed an info.php file with the code:
<?php
$maxlifetime = ini_get("session.gc_maxlifetime");
echo "max=".$maxlifetime;
echo "<hr>";
phpinfo();
?>
The output showed 1440 (24 mins) for both the echo and session.gc_maxlifetime in the phpinfo().
So either a customer is logged out after 30 mins or 24 mins. Either way, I prefer to have the customer log out after a period of inactivity. How do I do this?