From 904b89dc9f4139b149c63474f7b646bc5805d722 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 7 Jan 2010 20:49:04 +0000 Subject: [PATCH] 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 --- wp-includes/pluggable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 997ae10c3..f9956ad20 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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;