Forum

Thread tagged as: Question, Members, Shop

Delete Member Account

Is there a php command that can delete the logged in member's account?

Jade Marling

Jade Marling 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Like a CLI command? Could you give some context?

I want to be able to give the customer the option to checkout as a guest, and at the moment, it automatically creates a log in for them with a password. So I want to do it so that when the order is complete, the account is deleted.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've already done that. I want to be able to automatically delete the account

Drew McLellan

Drew McLellan 2638 points
Perch Support

That is not something we would advise.

My client is asking for it. If a customer checks out as a guest at the moment and they later on want to place another order, it says that they have already created an account. They want to avoid this

Drew McLellan

Drew McLellan 2638 points
Perch Support

Deleting member accounts is not the way to do that.

If that's what your client is asking for, then it's up to you to judge if that's a good solution, but it's not something we can offer you support for as it's not how the software is designed to work.

Do you have an alternative solution then?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, not deleting the account. The solution is outlined in the documentation I linked to.

If you're having a specific problem, feel free to raise a thread about it, that's fine, and we'll try to help. I'm not going to advise you to start deleting parts of data that will essentially break your shop, no matter how much your client wants that.

So after the checkout, and the customer doesn't want to ‘adopt’ their account, how can they checkout as a guest again?

Drew McLellan

Drew McLellan 2638 points
Perch Support

As long as they've been logged out, then they should just be able to repeat the process.

Thank you