From 483f9b5f1f4b70c2ab9401f82905ab06447374ae Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Sat, 23 Nov 2013 20:28:51 +0000
Subject: [PATCH] Rollback logic to get reply-to email

We do not support multiple emails per user at the moment.  We'll revisit the
issue once such support is added.
---
 include/class.ticket.php | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 0c1fe0b3c..647a246e4 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -195,18 +195,13 @@ class Ticket {
     function getEmail(){
         if ($o = $this->getOwner())
             return $o->getEmail();
+
         return null;
     }
 
     function getReplyToEmail() {
-        if ($this->ht['user_email_id']) {
-            if (!isset($this->reply_email))
-                $this->reply_email = UserEmail::lookup($this->ht['user_email_id']);
-            return $this->reply_email->address;
-        }
-        else {
-            return $this->getEmail();
-        }
+        //TODO: Determine the email to use (once we enable multi-email support)
+        return $this->getEmail();
     }
 
     function getAuthToken() {
@@ -2074,7 +2069,6 @@ class Ticket {
         $sql='INSERT INTO '.TICKET_TABLE.' SET created=NOW() '
             .' ,lastmessage= NOW()'
             .' ,user_id='.db_input($user->id)
-            .' ,user_email_id='.db_input($user_email->id)
             .' ,ticketID='.db_input($extId)
             .' ,dept_id='.db_input($deptId)
             .' ,topic_id='.db_input($topicId)
-- 
GitLab