violinman 1 Posted December 13, 2020 Share Posted December 13, 2020 Hello, I have a issue with deleting and existing customers registered email address. Cubecart will not allow me to delete it, this is the error message: "That email is already being used, failed to update customer" it makes no difference if the customer is registered or unregistered. I am using Cubecart 6.2.9 Thank you, Brian Quote Link to post Share on other sites
bsmither 1,481 Posted December 13, 2020 Share Posted December 13, 2020 In CubeCart_customer, the 'email' column is assigned a UNIQUE index and does not allow nulls. (It is also part of a FULLTEXT index - irrelevant for this situation.) As such, the database engine is objecting to the UPDATE that attempts to blank out the email value. The wording of CubeCart's error message is perhaps misleading. But if the problem is actually, somehow, that there exists a record in CubeCart_customer that has for 'email' a zero-length string (which is not the same as a null), trying to make a second record have the same value - a zero-length string - would violate the UNIQUE constraint. Quote Link to post Share on other sites
violinman 1 Posted December 13, 2020 Author Share Posted December 13, 2020 Well I think I understand that, so if I replaced the email with a different email address would that be accepted? The other problem I have is removing a customer who has placed an order sometime in the past, is there a way to remove the customer without having first to delete their past orders? Many thanks, Brian Quote Link to post Share on other sites
bsmither 1,481 Posted December 13, 2020 Share Posted December 13, 2020 (edited) Using a new email address not already being used is permitted. You can force deleting a record from CubeCart_customer (though not through normal CubeCart processes). You can disable a customer, which may get you the same effect as what I assume you are wanting. Edited December 13, 2020 by bsmither Quote Link to post Share on other sites
violinman 1 Posted December 13, 2020 Author Share Posted December 13, 2020 Ok thanks Brian, Appreciate your help. Brian Quote Link to post Share on other sites
macgillivray 4 Posted December 17, 2020 Share Posted December 17, 2020 (edited) How about "amending" the login details - eg adding an extra character or two at the end of their name(s) That would mean that they can't log in, I believe. I meant to add that changing the email addy from [email protected] to [email protected] should make life difficult for folks too! Edited December 17, 2020 by macgillivray Quote Link to post Share on other sites
violinman 1 Posted December 17, 2020 Author Share Posted December 17, 2020 Hi Bsmither, you mentioned force deleting a customer by other means, could you give me some more information on that? Thanks, Brian Quote Link to post Share on other sites
bsmither 1,481 Posted December 17, 2020 Share Posted December 17, 2020 That would be using an external database manager utility, such as phpMyAdmin. Or, in admin, Maintenance, Query Database (Advanced) tab, you can enter a manually constructed DELETE query. I strongly recommend you just disable the customer. Deleting a record that several other tables make reference to needs radical justification. Quote Link to post Share on other sites
violinman 1 Posted December 17, 2020 Author Share Posted December 17, 2020 Ok will try the disable first. Many thanks. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.