mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 03:40:10 +00:00
Fix session problem on 32 bit systems when using "stay logged in permanently" (fixes #278)
This commit is contained in:
@@ -40,7 +40,7 @@ class SessionService extends BaseService
|
||||
$expires = date('Y-m-d H:i:s', intval(time() + 2592000)); // Default is that sessions expire in 30 days
|
||||
if ($stayLoggedInPermanently === true)
|
||||
{
|
||||
$expires = date('Y-m-d H:i:s', intval(time() + 31220640000)); // 999 years aka forever
|
||||
$expires = date('Y-m-d H:i:s', PHP_INT_SIZE == 4 ? PHP_INT_MAX : PHP_INT_MAX>>32); // Never
|
||||
}
|
||||
|
||||
$sessionRow = $this->Database->sessions()->createRow(array(
|
||||
|
Reference in New Issue
Block a user