views:

73

answers:

2

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.

+1  A: 

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

Jonathan Day
This is exactly what I saw as well. It seems that the flag is useful for now, but if Varien decides to either use it or drop it, you're in trouble. You could also add a custom field to accomplish the same with greater upgrade safety.
Joseph Mastey
I agree, which probably means that it's safer to create your own module with an EAV attribute in the customer attribute_set (which will appear in the Admin automatically), and then use that when overriding `loginPostAction`.
Jonathan Day
A: 

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

Customer Activation Extension

melee
true, and it looks like it sends email notifications too.
Jonathan Day
We use it on our store and I can't really complain. It does the job.
melee