Add a drupal_alter to the user_password function so that other modules can modify the auto generated password to comply with any password restrictions, i.e. having a number and a letter in the password.

Comments

artkon’s picture

mdupont’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

user_password() is used in a few place to generate a dummy password that will never be used (for example for tests, OpenID or other modules enabling external authentication, where users won't use this password to authenticate).

Therefore if you want to use user_password() in a custom module to generate passwords that will effectively be used or displayed to the user, you're better off writing a custom function, calling user_password() then altering it in your custom code (called only where needed) rather than calling a hook from inside user_password() (called everytime even when not needed).