Limit ticket creation to specific emails e.g same domain

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
magwagwaodell
Posts: 1
Joined: Tue Dec 10, 2013 6:44 am

Limit ticket creation to specific emails e.g same domain

Post 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
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

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

Post 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!";
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
nesguep
Posts: 1
Joined: Mon Feb 03, 2014 2:40 pm

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

Post by nesguep »

Thank you so much, worked like a charm.

Cheers from Chile.
Post Reply