Permalink
Browse files

Only send notification to customers whos' status actually was updated

  • Loading branch information...
1 parent c69ddb8 commit 63cce58dc395792383ec7bb98efc0d7b5d2c672e @Vinai committed Nov 12, 2013
@@ -79,7 +79,7 @@ public function massSetActivationStatus(array $customerIds, $value)
$this->_getWriteAdapter()->insertMultiple($table, $rows);
}
}
- return $this;
+ return $changeIds;
}
/**
@@ -34,19 +34,19 @@ public function massActivationAction()
$paramValue = $this->getRequest()->getParam('customer_activated');
try {
- Mage::getResourceModel('customeractivation/customer')
+ $updatedCustomerIds = Mage::getResourceModel('customeractivation/customer')
->massSetActivationStatus(
$customerIds, $this->_shouldSetToActivated($paramValue)
);
Mage::getSingleton('adminhtml/session')->addSuccess(
Mage::helper('customeractivation')->__(
- 'Total of %d record(s) were successfully saved', count($customerIds)
+ 'Total of %d record(s) were successfully saved', count($updatedCustomerIds)
)
);
if ($this->_shouldSendActivationNotification($paramValue)) {
- $this->_sendActivationNotificationEmails($customerIds);
+ $this->_sendActivationNotificationEmails($updatedCustomerIds);
}
} catch (Exception $e) {
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

0 comments on commit 63cce58

Please sign in to comment.