I am working on one custom module where i need to show customers.After getting the customer fields i am little confused that for customer activation which field is to be set.Is Active
or Customer Activated
? I am trying to update customer info and it updates customer activated but not is active.
My code is follow :
$id = $this->getRequest()->getParam('id');
$model = Mage::getModel("customer/customer")->load($id);
$model ->setWebsiteId($websiteId)
->setStore($store)
->setFirstname($data['firstname'])
->setLastname($data['lastname'])
->setEmail($data['email'])
->setCustomerActivated($data['is_active'])
->setIsActive($data['is_active'])
->setGroupId($data['group_id']);
$model->save();
I want to set customer status either active or not on basis of either is active
or Customer Activated.
Best Answer
There's a certain excellent (free) extension from certain distinguished Magento community member, that does just that:
http://www.magentocommerce.com/magento-connect/customer-activation.html
Use it as a template for whatever you plan to build.