ezfindit Posted December 22, 2006 Share Posted December 22, 2006 Has a fixed been found to prevent Existing Customers from creating a New Account with the SAME Email Address? This keep happening and it appears to be a known bug. It should be a relatively simple fix, I think. I have been searching the forums for some information on this and a possible solution for quite a while and I have only found this mention: http://www.oscommerce.com/forums/index.php?showtopic=33632 but no follow up or fix. Any help would be greatly appreciated. :'( Chris Link to comment Share on other sites More sharing options...
insomniac2 Posted December 22, 2006 Share Posted December 22, 2006 You should not be getting duplicate email addresses when a customer creates an account. The default osc catalog/create_account.php should have this following code block starting at line 97 of an unmodified file. This code is what says that if the email address already exists ... an error message is displayed and the customer must choose another address or else creating an account will continue to fail. CODE BLOCK : Approx line 97: 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...
insomniac2 Posted December 22, 2006 Share Posted December 22, 2006 One more possibility might be: The above code checks the email address value regardless of whether it is a new customer or an existing customer. Either of them should still get a warning message that the address already exists. Is it possible that you may have another mod installed that is not doing this basic check ... and therefore adding another duplicate? I would go through any mods installed that have anything to do with altering the email address field in the customers database table ... assuming that your create_account.php file does properly contain the code above . Link to comment Share on other sites More sharing options...
ezfindit Posted December 23, 2006 Author Share Posted December 23, 2006 Found the Bug! :D It was caused by the Custom Create Account contribution which replaced the create_account.php file with a modified version: http://www.oscommerce.com/community/contri...ry/search,22462 Several instances of "else {$error = false;}" were causing the Email Address check not to work. Removed them and everything is working ok now! Here are the changes in case anyone else has installed that particular contribution: In create_account.php, delete all: else {$error = false;} except the one above the: if (ACCOUNT_GENDER == 'true') { Thanks for the quick response. Much appreciated! :thumbsup: Chris Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.