summaryrefslogtreecommitdiffstats
path: root/wp-includes/wpmu-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-17 18:34:07 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-17 18:34:07 +0000
commita48e8fc67bce66009ffe0d1541f7acbfb65daf41 (patch)
tree469ecb2d128ea8867eae43817e2253128281f576 /wp-includes/wpmu-functions.php
parentdc5d4415dc609ee563cbcac8147677c16250f964 (diff)
downloadwordpress-mu-a48e8fc67bce66009ffe0d1541f7acbfb65daf41.tar.gz
wordpress-mu-a48e8fc67bce66009ffe0d1541f7acbfb65daf41.tar.xz
wordpress-mu-a48e8fc67bce66009ffe0d1541f7acbfb65daf41.zip
Reverting the last change, but leaving in the optional param $len
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1094 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r--wp-includes/wpmu-functions.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index b5e2c60..a9c9f41 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1251,20 +1251,10 @@ function wpmu_activate_signup($key) {
return array('blog_id' => $blog_id, 'user_id' => $user_id, 'password' => $password, 'title' => $signup->title, 'meta' => $meta);
}
-function generate_random_password($len=8) {
- $keys = array(
- 'qwertasdfgzxcvb2345', // left hand
- 'yuiophjknm6789' // right hand
- );
-
- // generate a password with alternating left/right hand keys
- $pass = '';
- for ($i=0; $i<$len; $i++) {
- $hand = $keys[$i%2];
- $pass .= substr($hand, mt_rand(0, strlen($hand)-1), 1);
- }
-
- return apply_filters('random_password', $pass);
+function generate_random_password( $len = 8 ) {
+ $random_password = substr(md5(uniqid(microtime())), 0, intval( $len ) );
+ $random_password = apply_filters('random_password', $random_password);
+ return $random_password;
}
function wpmu_create_user( $user_name, $password, $email) {