This commit is contained in:
xisi 2014-01-19 02:06:22 -05:00
parent ccc7fa6fe9
commit befc5b9276
2 changed files with 1 additions and 2 deletions

View File

@ -47,7 +47,6 @@ class Token Extends Base {
$expiretime = $this->tokentype->getExpiration($type); $expiretime = $this->tokentype->getExpiration($type);
$ctimedata = new DateTime($this->getCreationTime($token)); $ctimedata = new DateTime($this->getCreationTime($token));
$checktime = $ctimedata->getTimestamp() + $expiretime; $checktime = $ctimedata->getTimestamp() + $expiretime;
$now = time();
if ($checktime >= $now && $checkTimeExplicitly || !$checkTimeExplicitly) { if ($checktime >= $now && $checkTimeExplicitly || !$checkTimeExplicitly) {
if ($checkTimeExplicitly) { if ($checkTimeExplicitly) {
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? AND token = ? AND type = ? AND ? >= UNIX_TIMESTAMP() LIMIT 1"); $stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? AND token = ? AND type = ? AND ? >= UNIX_TIMESTAMP() LIMIT 1");