From 170242e8466b03f9a25156345895bf95cdf2da2c Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 22 Apr 2015 17:10:21 -0500
Subject: [PATCH] oops: Fix missing association btw email address and user

---
 include/class.orm.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/class.orm.php b/include/class.orm.php
index 38e1d931d..75078e272 100644
--- a/include/class.orm.php
+++ b/include/class.orm.php
@@ -1368,6 +1368,9 @@ class InstrumentedList extends ModelInstanceManager {
 
         $object->set($this->key, $this->id);
 
+        if (!$object->__new__)
+            $object->save();
+
         if ($at !== false)
             $this->cache[$at] = $object;
         else
-- 
GitLab