From befc5b9276e63cf9a04bd5496cc410a84bcd8597 Mon Sep 17 00:00:00 2001 From: xisi Date: Sun, 19 Jan 2014 02:06:22 -0500 Subject: [PATCH] cleanup --- public/include/classes/token.class.php | 1 - sql/014_accounts_update.sql | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/include/classes/token.class.php b/public/include/classes/token.class.php index 4bcfc033..a1198b6d 100644 --- a/public/include/classes/token.class.php +++ b/public/include/classes/token.class.php @@ -47,7 +47,6 @@ class Token Extends Base { $expiretime = $this->tokentype->getExpiration($type); $ctimedata = new DateTime($this->getCreationTime($token)); $checktime = $ctimedata->getTimestamp() + $expiretime; - $now = time(); if ($checktime >= $now && $checkTimeExplicitly || !$checkTimeExplicitly) { if ($checkTimeExplicitly) { $stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? AND token = ? AND type = ? AND ? >= UNIX_TIMESTAMP() LIMIT 1"); diff --git a/sql/014_accounts_update.sql b/sql/014_accounts_update.sql index 52ebfe88..821be3a9 100644 --- a/sql/014_accounts_update.sql +++ b/sql/014_accounts_update.sql @@ -1,5 +1,5 @@ ALTER TABLE `accounts` ADD COLUMN `signup_timestamp` INT( 10 ) NOT NULL DEFAULT '0' AFTER `failed_pins`; -ALTER TABLE `accounts` ADD COLUMN `notify_email` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `email` ; +ALTER TABLE `accounts` ADD COLUMN `notify_email` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `email`; TRUNCATE TABLE `token_types`; INSERT INTO `token_types` (`id`, `name`, `expiration`) VALUES (1, 'password_reset', 3600), (2, 'confirm_email', 0), (3, 'invitation', 0), (4, 'account_unlock', 0), (5, 'account_edit', 360), (6, 'change_pw', 360), (7, 'withdraw_funds', 360); INSERT INTO `settings` (`name`, `value`) VALUES ('DB_VERSION', '0.0.4') ON DUPLICATE KEY UPDATE `value` = '0.0.4';