Page 1 of 1

Limit ticket creation to specific emails e.g same domain

Posted: Tue Dec 10, 2013 6:59 am
by magwagwaodell
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:
Good day,
I have used the hesk system for a year and half now, i love it so much. I have a one problem though, my organisation is an academic institution and our clients are staff and students only. All of them have academic email addresses and would like the system to limit ticket creation to people with the academic emails.

Meaning only people with the emails with the domain academicinstitution.edu can create a ticket.

Thank you in advance

Re: Limit ticket creation to specific emails e.g same domain

Posted: Tue Dec 10, 2013 4:27 pm
by Klemen
You didn't write what version of HESK you are using, but in 2.5.2 edit submit_ticket.php

Find line

Code: Select all

$tmpvar['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer['email']=$hesklang['enter_valid_email'];
Just below that line add something like

Code: Select all

if ( strpos( strtolower($tmpvar['email']), '@academicinstitution.edu') === false )
{
$hesk_error_buffer['email']="Please use your @academicinstitution.edu email address!";
}

Re: Limit ticket creation to specific emails e.g same domain

Posted: Mon Feb 03, 2014 2:41 pm
by nesguep
Thank you so much, worked like a charm.

Cheers from Chile.