MyBB Community Forums

Full Version: Register with specific email
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hay

I've got a question. When new users create an account they have to enter their e-mail. But I only want to allow users with an e-mail address that ends with @domain.com =. How do I do this?
So I want them to enter something like 'myfullname' in the textbox and the forum automatically saves [email protected].
Which template do I need to edit and how do I do this?
you will need a script for this I'd say

very complicated

I was looking for something along the lines of this and it turned out to be so hard I gave up
I found this

<!--
	regValidator = new FormValidator('registration_form');
	regValidator.register('username', 'notEmpty', {failure_message:'{$lang->js_validator_no_username}'});
    regValidator.register('email', 'regexp', {match_field:'email2', regexp:'^([a-zA-Z0-9_\\.\\+\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$', failure_message:'{$lang->js_validator_invalid_email}'});
	regValidator.register('email2', 'matches', {match_field:'email', status_field:'email_status', failure_message:'{$lang->js_validator_email_match}'});
{$validator_extra}
	regValidator.register('username', 'ajax', {url:'xmlhttp.php?action=username_availability', loading_message:'{$lang->js_validator_checking_username}'}); // needs to be last
// -->

Is this something that I could change?