Where is the autogenerated password generated?
-
12-12-2019 - |
Question
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!
Solution
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 no
t then generate password by generatePassword function
If you want to auto generate password by
generatePassword()
of object of class Mage_Customer_Model_Customer_Model
OTHER TIPS
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);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange