forked from Wavyzz/dolibarr
expire was initiated as true instead of false
This commit is contained in:
@@ -886,7 +886,7 @@ class CMailFile
|
|||||||
$storage = new DoliStorage($db, $conf);
|
$storage = new DoliStorage($db, $conf);
|
||||||
try {
|
try {
|
||||||
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
$tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME);
|
||||||
$expire = true;
|
$expire = false;
|
||||||
// Is token expired or will token expire in the next 30 seconds
|
// Is token expired or will token expire in the next 30 seconds
|
||||||
if (is_object($tokenobj)) {
|
if (is_object($tokenobj)) {
|
||||||
$expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30));
|
$expire = ($tokenobj->getEndOfLife() !== -9002 && $tokenobj->getEndOfLife() !== -9001 && time() > ($tokenobj->getEndOfLife() - 30));
|
||||||
|
|||||||
Reference in New Issue
Block a user