Run the old WPMU random_password filter in wp_generate_password(). Fixes #11746 props uglyrobot.
git-svn-id: https://develop.svn.wordpress.org/trunk@12653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7b580bf8e8
commit
1a17554691
@ -1470,9 +1470,12 @@ function wp_generate_password($length = 12, $special_chars = true) {
|
||||
$chars .= '!@#$%^&*()';
|
||||
|
||||
$password = '';
|
||||
for ( $i = 0; $i < $length; $i++ )
|
||||
for ( $i = 0; $i < $length; $i++ ) {
|
||||
$password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1);
|
||||
return $password;
|
||||
}
|
||||
|
||||
// random_password filter was previously in random_password function which was deprecated
|
||||
return apply_filters('random_password', $password);
|
||||
}
|
||||
endif;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user