From 4c6effde81390a56761fb40409edb188299ef6bc Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 3 Sep 2013 16:16:04 -0500
Subject: [PATCH] Don't send emails for non-existent table

When an admin logs in to upgrade to 1.7.1 and further from a version
pervious to 1.7.1, the system will attempt to clear password reset tokens
from the config table, which hasn't been upgraded yet to the namespaced
version from 1.7.1
---
 include/class.staff.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.staff.php b/include/class.staff.php
index e0220120c..c434d3d1c 100644
--- a/include/class.staff.php
+++ b/include/class.staff.php
@@ -690,7 +690,7 @@ class Staff {
         //       this user id
         $sql = 'DELETE FROM '.CONFIG_TABLE.' WHERE `namespace`="pwreset"
             AND `value`='.db_input($this->getId());
-        db_query($sql);
+        db_query($sql, false);
         unset($_SESSION['_staff']['reset-token']);
     }
 
-- 
GitLab