change hours to minutes (Lifetime of back office cookies)

if you check the "Stay logged in" checkbox, the value of "Lifetime of back office cookies" in the BO will be used as expiration time. And you can change it into minutes by the following file.

/config/config.inc.php

line174

/* Instantiate cookie */
$cookie_lifetime = defined('_PS_ADMIN_DIR_') ? (int) Configuration::get('PS_COOKIE_LIFETIME_BO') : (int) Configuration::get('PS_COOKIE_LIFETIME_FO');
if ($cookie_lifetime > 0) {
//edited by Jimmy @30Sep2022 change hours to mins for the
// $cookie_lifetime = time() + (max($cookie_lifetime, 1) * 3600);
$cookie_lifetime = time() + (max($cookie_lifetime, 1) * 60);
}

 

if  the "Stay logged in" checkbox is unchecked, the following code will affect the Lifetime of back office cookies in the BO. And you can change the code into any number by the following file. Default is 3600 seconds (60minutes)

/classes/controller/AdminController.php

line 411

/** @var int Auth cookie lifetime */
// edit by Jimmy @30Sep2022 change to 10 mins
// const AUTH_COOKIE_LIFETIME = 3600;
const AUTH_COOKIE_LIFETIME = 600;