I understand it better this way.
authorGunnar Wrobel <p@rdus.de>
Tue, 30 Nov 2010 11:51:44 +0000 (12:51 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 30 Nov 2010 12:48:29 +0000 (13:48 +0100)
framework/Token/lib/Horde/Token/Base.php

index bc77044..9cbf433 100644 (file)
@@ -148,7 +148,7 @@ abstract class Horde_Token_Base
         if ($timeout === null) {
             $timeout = $this->_params['token_lifetime'];
         }
-        if ($timeout >= 0 && ($timestamp + $timeout - time()) <= 0) {
+        if ($timeout >= 0 && (time() - $timestamp - $timeout) >= 0) {
             return false;
         }
         if ($unique) {