Preserve the current Alpha source and artwork snapshot. See handoff/alpha-1.0.0.3 for actual deployed hashes, checks, staged follow-ups and the production pause. This checkpoint does not claim every source feature is deployed.
12 lines
586 B
PHP
12 lines
586 B
PHP
<?php
|
|
// Email-only intake controls. Existing ticket replies are processed before Ticket::create.
|
|
function dune_email_intake_allowed($origin,$vars,&$errors){
|
|
if(strcasecmp((string)$origin,'email')!==0)return true;
|
|
$sender=trim((string)($vars['email']??''));
|
|
if(!filter_var($sender,FILTER_VALIDATE_EMAIL)){$errors['err']='A valid sender address is required.';return false;}
|
|
if($user=TicketUser::lookupByEmail($sender)){
|
|
if($user->getNumOpenTickets()>0){$errors['err']='One open email ticket is allowed per sender. Reply to your existing ticket.';return false;}
|
|
}
|
|
return true;
|
|
}
|
|
|

Staff