maivers Posted May 25, 2009 Share Posted May 25, 2009 I noticed a problem where returning customers weren't recognized when trying to login and I have narrowed the problem down to having duplicate accounts with the same email. I've been looking through store/catalog/create_account.php, it looks like this is the code that is supposed to check for duplicate emails. Not sure why it's not working. Any ideas would be much appreciated. if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR); } elseif (tep_validate_email($email_address) == false) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } else { $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); $check_email = tep_db_fetch_array($check_email_query); if ($check_email['total'] > '0') { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.