Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help, can you block certain email domains from registering accounts?


kdogg

Recommended Posts

Like the topic asks, can you ban certain email domains from registering accounts with an OS Commerce shopping cart?

 

I have some jerk off using @spamcorptastic.com email addresses to register fake accounts and trying to place fraudulent orders.

 

I want to be able to block known spam email hosts. If there a way? Sorta like how people block/ban Hotmail, Yahoo etc.

Link to comment
Share on other sites

This can be done multiple ways. A simple way is to implement javascript on the registration that checks the email field for *@domain.com. Try googling it like "Javascript form block email domains" something along that line. What it will do is not submit if the email is blocked.

Link to comment
Share on other sites

This can be done multiple ways. A simple way is to implement javascript on the registration that checks the email field for *@domain.com. Try googling it like "Javascript form block email domains" something along that line. What it will do is not submit if the email is blocked.

 

When you said implement javascript, you might as well have been speaking Chinesee.

 

I know what Javascript is but I have NO idea how to do any of that. If it comes in a the form of a contribution, I can figure it out by reading the instructions simply because it tells me where to copy and paste in the code.

Link to comment
Share on other sites

There is a validation code in oscommerce.

For email validation part place some string compare function and depending on what the result comes YOu can either allow or return without registraion.

 

Satish Mantri

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

There is a validation code in oscommerce.

For email validation part place some string compare function and depending on what the result comes YOu can either allow or return without registraion.

 

Satish Mantri

 

That isn't the problem. I have email verification installed. I have reCAPTHCA installed, the jerkoff is using email accounts from: http://10minutemail.com/10MinuteMail/index.html

 

All you do it go to that page and it automatically gives you a temp email that stays active for 10 minutes. No signing up, no signing in. As long as you leave the window open, your 10 minute mailbox stays active for 10 minutes.

 

It's designed to use with forums, shopping carts or other pages where you have to validate an email.

 

As soon as the person makes the account, the activation email is sent, its received into the 10 minute email box, you click the link, boom account activated.

 

I need to be able to block there domain from working with my shopping cart.

 

There is no contribution for this?

Link to comment
Share on other sites

If you can't find a contribution, insert this PHP code:

 

// beginning of domain filtering code

$domain_full = explode( "@", strtolower( $email_address ) ); // split the email at the @ sign

if ( count( $domain_full ) >= 2 ) {

  $domain_name = explode( ".", $domain_full[1] ); // split the domain at the period

  if ( count( $domain_name ) ) {

	$disallow = array("msn", "aol", "yahoo");  // domains to disallow - edit as desired

// loop checking all domains

	for ($i=0, $n=count( $disallow ); $i<$n; $i++) {
	  $pos = strpos($domain_name[0],  strtolower( $disallow[$i] ) );
	  if ( $pos !== false) {
		$error = true;
		$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
		break;
	  }
	}
  }
}

// end of domain filtering code

Just BEFORE this code:

 

	if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {

in /catalog/create_account.php.

 

The only line you should have to edit would be this one:

 

		$disallow = array("msn", "aol", "yahoo");  // domains to disallow - edit as desired

This is where you put the domains to disallow. Enter just the domain NAME, leave off the ".net" or ".com" part.

 

You can have as many as you want, one or one thousand.

 

Obviously don't leave it "as is". That's just the code I used for testing.

 

I tested it and it worked for me.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...