diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index f756816874a..79552539834 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -38,6 +38,7 @@ if (!defined("NOLOGIN")) { require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -100,7 +101,8 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a $ret = $object->fetch('', '', $track_id); if ($ret && $object->dao->id > 0) { // Check if emails provided is the one of author - if ($object->dao->origin_email == $email) + $emailofticket = CMailFile::getValidAddress($object->dao->origin_email, 2); + if ($emailofticket == $email) { $display_ticket = true; $_SESSION['email_customer'] = $email; @@ -174,7 +176,6 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a - if (! $error) { $action = 'view_ticket'; @@ -226,7 +227,8 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); print '