Hello,
I’m trying to create a cookie that expires every day at midnight so that users have to log in every morning, but I can’t do it.
In module “adm_Login”, function “remember_me_validate”, this is my change :
$remember_me_expiry_cookie = [sett_cookie_expiration_time];
// setcookie("usr_data", sc_encode(serialize($usr_data)),time()+60*60*24* $remember_me_expiry_cookie, '/');
$currentDateTime = new DateTime();
$midnightTimestamp = strtotime('tomorrow', $currentDateTime->getTimestamp());
setcookie("usr_data", sc_encode(serialize($usr_data)),$midnightTimestamp, '/');
Sometime I can see the cookie “user_data” :
But not in the morning when I reconnect.
Do you have an idea about this problem ?
Thanks