1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 limit registration to certain e-mail accounts

Discussion in 'XenForo Questions and Support' started by erich37, Jan 16, 2012.

  1. erich37

    erich37 Well-Known Member

    I would like to hinder users from registering at my forum using e-mail-accounts like Gmail.com or Yahoo.com
    Is there a way to set this in the ACP-options? How to do this properly?

    I would also like to add a text underneath the "e-mail-field" at the Registration-page saying "We do not allow registrations using Gmail.com or Yahoo.com accounts...."

    How and where to add this text?

    Many thanks!
  2. Brogan

    Brogan XenForo Moderator Staff Member

    ACP Search: email

    Ban the email accounts or domains as required.

    Edit the register_form template to add your text.
    Replace the email section with this:
    <dl class="ctrlUnit">
            <dt><label for="ctrl_email">{xen:phrase email}:</label></dt>
            <dd><input type="email" name="email" value="{$fields.email}" dir="ltr" class="textCtrl" id="ctrl_email" />
            <p class="explain">Your text here.</p></dd>
    Replace Your text here. as required.
    erich37 likes this.
  3. erich37

    erich37 Well-Known Member

    works great, thanks a lot Brogan!
  4. erich37

    erich37 Well-Known Member

    Hi Brogan,

    I have searched for "email" in ACP, but could not find a way of how to block user-registrations when users are using an Email-service like "gmail.com" or "hotmail.com", etc.
    Could you please give me some further instructions of how to do this?

    Many thanks!
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Users -> Banned Emails -> Email to Ban: *@gmail.com
    erich37 likes this.
  6. erich37

    erich37 Well-Known Member

    sorry to bother you again, Brogan.

    would this rather be



    why would there be a "dot" in front of the domain?
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, my mistake.

    It should be *@gmail.com
    erich37 likes this.
  8. erich37

    erich37 Well-Known Member

    Thanks a lot!
  9. Exote

    Exote New Member

    Hey what Brogan has showed helps a lot. But is there a way to only allow registration for certain email domains, rather than having to disallow everything.

    Badly explained my point, but what I am looking for is only allowing people from inside the company to register eg. only people with ***@somecompany.com and **@somesimilarcompany.com to be allowed to create an account?
  10. borbole

    borbole Well-Known Member

    You will need a custom mod for that.
  11. Exote

    Exote New Member

    Would you know any that will do this?
  12. borbole

    borbole Well-Known Member

    No. But you can put in a request at the Request Add on forum and see if there will be anyone willing to code this for you.
  13. Exote

    Exote New Member

    Never mind, I will see if I can slide some regex into the email validation when they register. If not, as you said, I will put in a request.

Share This Page