Welcome to Geeklog, Anonymous Friday, December 27 2024 @ 09:16 am EST

Geeklog Forums

Deny new user registration from specific domain(s)?


Status: offline

jgs

Forum User
Newbie
Registered: 05/21/05
Posts: 2
Location:Virginia
Hey folks,

I'm looking for a way to disallow new user registrations from certain domains (based on the email address, not the network they're connecting from). I get several new user signups daily from these domains, but the activiation emails all bounce back as undeliverable.

I'm aware of the allow_domains setting in the config.php file, but haven't been able to find something like deny_domains. Am I overlooking something or is this possible with a simple hack?

Any insight would be appreciated.
 Quote

Status: offline

jgs

Forum User
Newbie
Registered: 05/21/05
Posts: 2
Location:Virginia
I got if worked out, just hacked at the users.php and english.php files. Here's what I came up with is working just fine:

In users.php, directly below case 'create':
Text Formatted Code

// Adding code to try an block cashette.com registrations.
    if ((isset($_POST['email'])) && (eregi("cashette.com", $_POST['email']))) {
        $display .= COM_siteHeader ('menu');
        $display .= COM_startBlock ($LANG04[21], '',
                            COM_getBlockTemplate ('_msg_block', 'header'))
                 . $LANG04[124]
                 . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
        $display .= COM_siteFooter ();
        COM_accesslog("BANCONTROL: Denied registration for blocked domain -- ".$_POST['email']." ");
        break;
       }


 


and in languages english.php in the LANG04 array:
Text Formatted Code

    124 => "<img src='/images/arrow.gif?'> Registration cancelled. Email address domain cashette.com is not allowed here. <a href="{$_CONF['site_url']}/users.php?mode=new">Click Here</a> to register with a different email address."


 


Maybe this will help someone looking to do similar.
Edited to add logging as well. Smile
 Quote

All times are EST. The time is now 09:16 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content