2

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?

Thanks!

1

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

3

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, privacy policy and cookie policy

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