Skip to content
Snippets Groups Projects
Commit 16e58787 authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Allow user name and email to be blocked

Fixes a regression in 1.8 where user names and emails submitted via the web
interface would not properly be detected by the filter system for rejection.

References:
http://osticket.com/forum/discussion/75456/v1-8-ticket-filter-for-banning-domain-doesn-t-work
parent e9591ac4
No related branches found
No related tags found
No related merge requests found
......@@ -1976,6 +1976,13 @@ class Ticket {
foreach ($form->getFields() as $f)
$vars['field.'.$f->get('id')] = $f->toString($f->getClean());
// Unpack the basic user information
$interesting = array('name', 'email');
$user_form = UserForm::getUserForm()->getForm($vars);
foreach ($user_form->getFields() as $f)
if (in_array($f->get('name'), $interesting))
$vars[$f->get('name')] = $f->toString($f->getClean());
//Init ticket filters...
$ticket_filter = new TicketFilter($origin, $vars);
// Make sure email contents should not be rejected
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment