From f44f8d99d185805bf7bb1e03d5fba040cc907c4d Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 7 May 2008 17:24:37 +0000 Subject: Ignore activation key in db. Generate a correct key, thanks mtdewvirus git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1273 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/pluggable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'wp-includes/pluggable.php') diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index eabf1ae..be7dda2 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1175,8 +1175,11 @@ if ( !function_exists('wp_generate_password') ) : * * @return string The random password **/ -function wp_generate_password($length = 12) { - $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()"; +function wp_generate_password($length = 12, $special_chars = true) { + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + if ( $special_chars ) + $chars .= '!@#$%^&*()'; + $password = ''; for ( $i = 0; $i < $length; $i++ ) $password .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); -- cgit