Skip to content

Instantly share code, notes, and snippets.

@p3mbo
Created October 16, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p3mbo/224f01996ff5b4849d189c38325c0bbd to your computer and use it in GitHub Desktop.
Save p3mbo/224f01996ff5b4849d189c38325c0bbd to your computer and use it in GitHub Desktop.
Fix new customers not being sent password in Magento 1.9.3 when auto-generation is enabled.
diff --git a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php
index f786bc6..6e6c7f0 100644
--- a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php
@@ -341,10 +341,10 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action
if ($customer->getWebsiteId() && (isset($data['account']['sendemail']) || $sendPassToEmail)) {
$storeId = $customer->getSendemailStoreId();
if ($isNewCustomer) {
- $customer->sendNewAccountEmail('registered', '', $storeId);
+ $customer->sendNewAccountEmail('registered', '', $storeId, $customer->getPassword());
} elseif ((!$customer->getConfirmation())) {
// Confirm not confirmed customer
- $customer->sendNewAccountEmail('confirmed', '', $storeId);
+ $customer->sendNewAccountEmail('confirmed', '', $storeId, $customer->getPassword());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment