Forums / General Questions / Account Creation E-Mail Address Problem

Account Creation E-Mail Address Problem

Locked
Results 1 to 9 of 9
This thread is locked. New replies are disabled.
30 May 2006, 17:11
#1
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Account Creation E-Mail Address Problem

I installed zen cart, customized it fully to my needs, but when I try and create a customer account I get this error:

Sorry, my system does not understand your email address. Please try again.


I get that no matter which email I use.. they are all valid [email protected] email addresses.

Does anyone know why this error is showing up and how to fix it?

Thanks.
30 May 2006, 17:51
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Posts:
2,361
Plugin Contributions:
1

Re: Account Creation E-Mail Address Problem

The address is failing the validation check in includes/modules/create_account.php
  } elseif (zen_validate_email($email_address) == false) {
    $error = true;

    $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);


either you've modified that section of the file or you've got a problem with the function zen_validate_email() in includes/functions/functions_email.php
30 May 2006, 19:45
#3
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

}

if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR);
} elseif (zen_validate_email($email_address) == false) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
} else {
$check_email_query = "select count(*) as total
from " . TABLE_CUSTOMERS . "
where customers_email_address = '" . zen_db_input($email_address) . "'";

$check_email = $db->Execute($check_email_query);

if ($check_email->fields['total'] > 0) {
$error = true;

$messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS);
}
}


Is that what I should see on that part of the file?
30 May 2006, 19:51
#4
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

Here's the email validate section in includes/functions/functions_email.php... does everthing look right?

/**
* validates an email address
*
* Sample Valid Addresses:
*
* [email protected]
* [email protected]
* "first last"@host.com
* "first@last"@host.com
* [email protected]
* first'[email protected]
* first.last@[123.123.123.123]
*
* hosts with either external IP addresses or from 2-6 characters will pass (e.g. .jp or .museum)
*
* Invalid Addresses:
*
* first [email protected]
* '[email protected]
* @param string The email address to validate
* @return booloean true if valid else false
**/
function zen_validate_email($email) {
$valid_address = true;

// fail if contains no @ symbol
if (!strstr($email,'@')) return false;

// split the email address into user and domain parts
// need to update to trap for addresses in the format of "first@last"@someplace.com
// this method will most likely break in that case
list( $user, $domain ) = explode( "@", $email );
$valid_ip_form = '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}';
$valid_email_pattern = '^[a-z0-9]+[a-z0-9_\.\'\-]*@[a-z0-9]+[a-z0-9\.\-]*\.(([a-z]{2,6})|([0-9]{1,3}))$';
//preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9\._-]+)+$/', $email))
//preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is');
$space_check = '[ ]';

// strip beginning and ending quotes, if and only if both present
if( (ereg('^["]', $user) && ereg('["]$', $user)) ){
$user = ereg_replace ( '^["]', '', $user );
$user = ereg_replace ( '["]$', '', $user );
$user = ereg_replace ( $space_check, '', $user ); //spaces in quoted addresses OK per RFC (?)
$email = $user."@".$domain; // contine with stripped quotes for remainder
}

// fail if contains spaces in domain name
if (strstr($domain,' ')) return false;

// if email domain part is an IP address, check each part for a value under 256
if (ereg($valid_ip_form, $domain)) {
$digit = explode( ".", $domain );
for($i=0; $i<4; $i++) {
if ($digit[$i] > 255) {
$valid_address = false;
return $valid_address;
exit;
}
// stop crafty people from using internal IP addresses
if (($digit[0] == 192) || ($digit[0] == 10)) {
$valid_address = false;
return $valid_address;
exit;
}
}
}

if (!ereg($space_check, $email)) { // trap for spaces in
if ( eregi($valid_email_pattern, $email)) { // validate against valid email patterns
$valid_address = true;
} else {
$valid_address = false;
return $valid_address;
exit;
}
}
return $valid_address;
}


?>
30 May 2006, 21:42
#5
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

Have you turned on the Validate Email addresses using DNS? If so - turn it off.
30 May 2006, 21:49
#6
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Posts:
1,875
Plugin Contributions:
1

Re: Account Creation E-Mail Address Problem

Kim, any specific reason for this suggestion to turn it off? We've always had it turned on without a problem. What do we lose/gain by setting to true/false.

Thanks!
30 May 2006, 22:02
#7
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

Kim:

Have you turned on the Validate Email addresses using DNS? If so - turn it off.


Nope, that's always been turned off..
31 May 2006, 02:44
#8
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

Anyone?

Can some some check their files to see if mine look right?
31 May 2006, 17:35
#9
liquidchill avatar

liquidchill

New Zenner

Join Date:
May 2006
Posts:
11
Plugin Contributions:
0

Re: Account Creation E-Mail Address Problem

Please?...