Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable customer in Magento

Tags:

php

magento

I want to include to the administrator the option to disable login accounts, no data would be erased from the account, but if would be disabled for users not using it more, once cleared, the user would not notice any newsletters or anything else, just one last mail notifying the deactivating your account.

like image 602
Castro Roy Avatar asked Sep 01 '10 12:09

Castro Roy


2 Answers

This is an interesting one. I've looked into this previously, and there is an is_active flag on the customer database record, but it is not accessed or written anywhere by the core Magento code. In order to achieve this requirement, you'll need to override the Mage_Customer_AccountController to check the value of this field inside loginPostAction() and then to make that field visible within the adminhtml Customer blocks.

I'm a little nervous about implementing that code as it bothers me that Varien would include the field but not utilise it at all. I'd be interested in others' thoughts about this.

HTH, JD

like image 72
Jonathan Day Avatar answered Sep 23 '22 11:09

Jonathan Day


Or, you could use this free extension from Magento Connect.

magentocommerce (deadlink) Customer Activation Extension

edit: Github project

like image 28
Nic Avatar answered Sep 24 '22 11:09

Nic