- Edited
Hello,I am looking to allow tickets to not require a matching email address to append, and ONLY require the ticket number in the subject.I have tried removing various snippits of code, and either break the fetcher, or break the system.I know this is done in class.thread.php, but am unable to figure out what I can remove to remove this requirement.I believe it's right around here: // Search for ticket by the in the subject line // This is the last resort - emails must match to avoid message // injection by third-party. $subject = $mailinfo; $match = array(); if ($subject && $mailinfo && preg_match ("/\/is", $subject, $match) && ($ticket = Ticket:($match)) //Lookup the user using the email address && ($user = User:(array('emails__address' => $mailinfo)))) { //We have a valid ticket and user $check1 = $ticket->getUserId(); $check2 = $user->getId(); //var_dump($check1); var_dump($check2); if ($check1 == $check2 //owner || ($c = Collaborator:( // check if collaborator array('userId' => $user->getId(), 'ticketId' => $ticket->getId())))) { $mailinfo = $user->getId(); return $ticket->getLastMessage(); } } // Search for the message-id token in the body if (preg_match('`(?-mid="|Ref-Mid: )(*)(?:$|")`', $mailinfo, $match)) if ($thread = ThreadEntry:($match, $mailinfo)) return $thread; return null;But still haven't quite gotten it yet.Any assistance is greatly appreciated!