I figured out what was really going on. A customer had COWOA'd using the email [email protected]. She later tried to create a regular account with [email protected]. At that point, the create_account script threw an error saying that the email already existed.
Unless I somehow missed updating my create_account.php script while installing this module, it looks like as it is, once you've COWOA'd with an email, you cannot then use it to create a regular account. If they try, they are told the email already exists. However if they try to retrieve their password, the COWOA mod to the password lookup page will tell them their email doesn't exist -- a perplexing result for the customer.
Looking at the code, it is an easy enough fix the problem. Following the same convention found in the following two files:
includes/modules/YOUR_TEMPLATE/no_account.php
includes/modules/pages/login/header.php
we simply modify the query that checks for a customer record with the existing email in the following file:
includes/modules/create_account.php
$check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password,
customers_email_address, customers_default_address_id,
customers_authorization, customers_referral
FROM " . TABLE_CUSTOMERS . "
WHERE customers_email_address = :emailAddress
AND COWOA_account != 1";
With this change, when the user attempts to create a new account, it will do so without problem. The existing modification to the login script ensures that the duplicate customer records for the COWOA modules won't confuse the system.
After my last bout of confusion, I want to stop here and ask the community if this change makes sense. If so, I'd like to contribute it back to the community.
Cheers,
Kevin Audleman