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
2010-09-01 13:42:19
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
2010-09-01 15:01:29
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
2010-09-01 23:06:35