Welcome, Guest. Please Login or Register.
May 14, 2025, 03:24:14 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Domain Blocking « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Domain Blocking  (Read 1703 times)
jimstone77
Noobie
*
Posts: 20


I'm a llama!

Domain Blocking
« on: July 29, 2003, 01:49:10 PM »
Reply with quote

YaBB SE Version: 1.5.4
PHP Version:
MySQL Version:
Server Platform: Unix, Linux, or BSD
Link to Forum:

Problem Description:
I have been trying without success to locate the domain blocker for this system. I would like to block all hotmail.com registrations. Incredibly, I cannot seem to find the part that does this in admin. I tried *.hotmail.com but that doesn';t work.

Could you tell me if I need to upgrade? I am using 1.5.4 and thought this was the latest version. If so, is there even this option available? Please Help me with this problem.

« Last Edit: August 03, 2003, 03:41:54 AM by [Unknown] » Logged
Metho
Sr. Member
****
Posts: 342


I'm a llama!

Re:Domain Blocking
« Reply #1 on: July 29, 2003, 03:47:33 PM »
Reply with quote

This should work. I tested it just briefly, but looked ok. In Register.php:

FIND:

   if (strlen($member['user']) > 25)

      $member['user'] = substr($member['user'], 0, 25);


ADD BEFORE:   $emaill = $member['email'];
   $result = preg_match('/hotmail.com$/i', $emaill);  
   if($result) {  
   fatal_error("Sorry, hotmail addresses are not considered to be a valid email address.");  
   }


Save, reupload, test.

Methonis
Logged

FaSan
Jr. Member
**
Posts: 67


Re:Domain Blocking
« Reply #2 on: July 29, 2003, 05:42:59 PM »
Reply with quote

Hi,

for more domains ?



FaSan
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Domain Blocking
« Reply #3 on: July 29, 2003, 06:14:48 PM »
Reply with quote

preg_match('/(hotmail.com)|(domain2.com)|(domain3.com)$/i', $emaill);
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
FaSan
Jr. Member
**
Posts: 67


Re:Domain Blocking
« Reply #4 on: July 30, 2003, 09:02:07 PM »
Reply with quote

Thanks !!!  ;D
Logged
FaSan
Jr. Member
**
Posts: 67


Re:Domain Blocking
« Reply #5 on: August 02, 2003, 03:00:09 PM »
Reply with quote

Is Possible more messages for anyone domain ?

Excuse my little english !


F.
Logged
Metho
Sr. Member
****
Posts: 342


I'm a llama!

Re:Domain Blocking
« Reply #6 on: August 02, 2003, 11:28:37 PM »
Reply with quote

Change it to this:   $emaill = $member['email'];
  $result = preg_match('/hotmail.com$/i', $emaill);  
  if($result) {  
   $domain = explode('@', $emaill);
   fatal_error("Sorry, $domain[1] addresses are not considered to be a valid email address.");  
  }


This will return "Sorry, hotmail.com addresses are not considered to be a valid email eddress."

Or if you have more domains, it should work the same, where hotmail.com is yahoo.com or whatever.


Methonis
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Domain Blocking « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.042 seconds with 20 queries.