From 363bc4b85812384ea6cce9e449cf3eb2561d2ad3 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 5 Dec 2013 11:09:52 -0600
Subject: [PATCH] fetch: Multiple email fetches may reflect same user

If two emails were fetched in the same timeframe, they may both be assigned
to the same user account.
---
 include/class.dynamic_forms.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php
index 081ceabc7..9606f0853 100644
--- a/include/class.dynamic_forms.php
+++ b/include/class.dynamic_forms.php
@@ -41,8 +41,8 @@ class DynamicForm extends VerySimpleModel {
     var $_fields;
     var $_dfields;
 
-    function getFields() {
-        if (!isset($this->_fields)) {
+    function getFields($cache=true) {
+        if (!isset($this->_fields) || !$cache) {
             $this->_fields = array();
             foreach ($this->getDynamicFields() as $f)
                 // TODO: Index by field name or id
@@ -83,7 +83,7 @@ class DynamicForm extends VerySimpleModel {
 
     function getForm($source=false) {
         if (!$this->_form || $source) {
-            $fields = $this->getFields();
+            $fields = $this->getFields(false);
             $this->_form = new Form($fields, $source, array(
                 'title'=>$this->title, 'instructions'=>$this->instructions));
         }
-- 
GitLab