-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent deleting data when non-existing customer #78
Conversation
Hello Thank for this PR. As said these methods are public (also deleteDataFromPrestashop). These methods can be used to create a cron and anonymize old accounts (our use case). |
@Matt75 in which case the id_customer = 0 ? |
@sarahdib Problem is only when id_customer = 0 ;) For example |
@Matt75 yes but I can't reproduce a case with id_customer = 0 in order to test. Do you now when a customer id is 0 ? |
@sarahdib No need to have a customer id = 0 ... it never happens but if id_customer = 0 is given, gpdr module delete :
|
@Matt75 Thanks :) |
\o/ |
ps-admin/index.php?controller=AdminAjaxPsgdpr&token=0fdd3c1562cd6e510b7f8f1bc9b35d56&ajax=true&action=DeleteCustomer&delete=customer&value=0
(Do not forget to change token by yours in this example)Prevent deleting data when non-existing customer, eg. $customer->id = 0
Bug reported from Addons