mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Run the old WPMU random_password filter in wp_generate_password(). Fixes #11746 props uglyrobot.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0d31c12db6
commit
904b89dc9f
@ -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