In the admin area, there is the "Send auto-generated password" checkbox in the customer area. Where is the corresponding function for that so I can modify it?


2 Answers 2


hi goto app/code/core/Mage/Adminhtml/CustomerController.php and then goto it saveAction function and then got empty($data['account']['new_password']) condition there magento check is check box checked or not then generate password by generatePassword function

If you want to auto generate password by

generatePassword() of object of class Mage_Customer_Model_Customer_Model


Take a look at Mage_Customer_Model_Customer

 * Retrieve random password
 * @param   int $length
 * @return  string
public function generatePassword($length = 8)
    $chars = Mage_Core_Helper_Data::CHARS_PASSWORD_LOWERS
        . Mage_Core_Helper_Data::CHARS_PASSWORD_UPPERS
        . Mage_Core_Helper_Data::CHARS_PASSWORD_DIGITS
        . Mage_Core_Helper_Data::CHARS_PASSWORD_SPECIALS;
    return Mage::helper('core')->getRandomString($length, $chars);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.