I don't know if anybody else has had this problem where the it just says 'no tickets found' when a customer logs in but for some reason the db_input($thisclient->getEmail())
function just doesn't return anything on the place where it is but it does when you move it a couple lines down.
So the fix is:
in tickets.inc.php
move:
//Restrict based on email of the user...STRICT!
$qwhere =' WHERE email='.db_input($thisclient->getEmail());
//STATUS
if($status){
$qwhere .=' AND status='.db_input($status);
}
to
//Ok..lets roll...create the actual query
$qselect.=' ,count(attach_id) as attachments ';
$qfrom.=' LEFT JOIN '.TICKET_ATTACHMENT_TABLE.' attach ON ticket.ticket_id=attach.ticket_id ';
$qgroup=' GROUP BY ticket.ticket_id';
//Restrict based on email of the user...STRICT!
$qwhere =' WHERE email='.db_input($thisclient->getEmail());
//STATUS
if($status){
$qwhere .=' AND status='.db_input($status);
}
$query="$qselect $qfrom $qwhere $qgroup ORDER BY $order_by $order LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$tickets_res = db_query($query);
then it works just fine (also with multiple tickets on 1 email).
Best regards,