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!

7 days later

don't mean to be a pest, but does anyone know what needs to be disabled to allow tickets to append only on the ticket # verification and not the email verification as well?  This is really impacting us at the moment.

That's definitely something I don't know since I am not so deep in the osTicket code. Hopefully someone else knows better.

4 days later

Ok, I've figured out some of this:Using the following code in ticket.thread.php, we've been able to get 100% of the replies to append to the ticket no matter what email address they're from, but the ticket "user" stays the same in some cases.  Sometimes, the user_id will change to the emailed in ticket.  I'm trying to figure out why this only happens some of the time, and how to make it happen all of the time - any help is appreciated.Thank you!        if ($subject && $mailinfo && preg_match ("/\/is", $subject, $match) && ($ticket = Ticket:($match))) {        $user = User:(array('emails__address' => $mailinfo));            $mailinfo = !empty($user) ? $user->getId() : $ticket->getUserId(); $sql ='UPDATE '.TICKET_TABLE.' SET updated = NOW() ' .', user_id = '.db_input($mailinfo) .' WHERE ticket_id = '.db_input($ticket->getId()); db_query($sql);            return $ticket->getLastMessage();        }

Write a Reply...