Results 1 to 9 of 9

Thread: Restrict user email on registration

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Restrict user email on registration

    I'd like to see a feature where the administrator can restrict certain email domains from being used when people register, in the same fashion that administrators of bulletin boards have. You can put in a particular address or an entire domain like *@yahoo.com or *@hotmail.com, etc.

    One I'd like to block in particular is Yahoo! because they are overly paranoid. They tend to block a lot of legitimate emails and then you have to jump through all kinds of hoops to get them to unblock you.

    Well, I got enough to do than jump through their hoops. I need to restrict the use of yahoo.com addresses from registration. I don't want to block users who are already signed up and using yahoo, I just want to block future registrations, since that is the email that their new account details and the activation link is sent to.

    Thanks.
    If it's not fun, stop doing it!

  2. #2

    Default

    Code:
     $email = $_POST['email'];
    $email = parse_url($email);
    $email = $email['host']
    
    if ($email == "yahoo.com" || $email == "hotmail.com"){
    
    echo "The administrator has chosen not to accept email addresses from Yahoo and Hotmail";
    
    echo "<a href=\"javascript:history.go(-1);\">
        <b><font size=\"2\">&lt;&lt; Previous page</font></b></a>";
    exit();
    }
    Last edited by carefree2; 05-20-2009 at 07:23 AM.

  3. #3
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default

    Yes, something like that except maybe with an alert dialogue that pops up when they hit submit: "Email addresses from this domain are restricted. Please use an alternate email address" (some similar wording) that they have to click "ok" to.

    ...and a spot in admin panel were the administrator can enter in the domains he/she wants to "ban" from registration (like they have in most forum admin panels).
    If it's not fun, stop doing it!

  4. #4

    Default

    Quote Originally Posted by grynmoors View Post
    Yes, something like that except maybe with an alert dialogue that pops up when they hit submit: "Email addresses from this domain are restricted. Please use an alternate email address" (some similar wording) that they have to click "ok" to.

    ...and a spot in admin panel were the administrator can enter in the domains he/she wants to "ban" from registration (like they have in most forum admin panels).

    I try to avoid too much javascript, direct code is much faster

    You can add a column to the config table with stored emails then use this script to check it

    A better way for all these mods is to write an autoinstaller like phpbb has, that way ppl can pick and choose what goes in and stays out.



  5. #5
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default

    Mod installer: Great idea, post it as feature request (if you haven't already).
    If it's not fun, stop doing it!

  6. #6

    Default

    Quote Originally Posted by grynmoors View Post
    Mod installer: Great idea, post it as feature request (if you haven't already).
    Yeah right, as if they will listen. Think its up to us to do it

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •