Ticket #11746: 11746.diff
| File 11746.diff, 2.7 KB (added by , 16 years ago) |
|---|
-
wp-includes/ms-deprecated.php
1 <?php 2 3 function generate_random_password( $len = 8 ) { 4 _deprecated_function( __FUNCTION__, '3.0', 'wp_generarte_password()' ); 5 $random_password = substr(md5(uniqid(microtime())), 0, intval( $len ) ); 6 $random_password = apply_filters('random_password', $random_password); 7 return $random_password; 8 } 9 10 ?> 11 No newline at end of file -
wp-includes/ms-functions.php
Property changes on: wp-includes/ms-deprecated.php ___________________________________________________________________ Name: svn:eol-style + native
1214 1214 $user_login = $wpdb->escape($signup->user_login); 1215 1215 $user_email = $wpdb->escape($signup->user_email); 1216 1216 wpmu_validate_user_signup($user_login, $user_email); 1217 $password = generate_random_password();1217 $password = wp_generate_password(); 1218 1218 1219 1219 $user_id = username_exists($user_login); 1220 1220 … … 1268 1268 return array('blog_id' => $blog_id, 'user_id' => $user_id, 'password' => $password, 'title' => $signup->title, 'meta' => $meta); 1269 1269 } 1270 1270 1271 function generate_random_password( $len = 8 ) {1272 $random_password = substr(md5(uniqid(microtime())), 0, intval( $len ) );1273 $random_password = apply_filters('random_password', $random_password);1274 return $random_password;1275 }1276 1277 1271 function wpmu_create_user( $user_name, $password, $email) { 1278 1272 $user_name = preg_replace( "/\s+/", '', sanitize_user( $user_name, true ) ); 1279 1273 if ( username_exists($user_name) ) -
wp-settings.php
405 405 if ( is_multisite() ) { 406 406 require_once( ABSPATH . WPINC . '/ms-functions.php' ); 407 407 require_once( ABSPATH . WPINC . '/ms-default-filters.php' ); 408 require_once( ABSPATH . WPINC . '/ms-deprecated.php' ); 408 409 } 409 410 410 411 if ( !defined('WP_CONTENT_URL') ) -
wp-admin/ms-edit.php
157 157 $password = 'N/A'; 158 158 $user_id = email_exists($email); 159 159 if( !$user_id ) { // Create a new user with a random password 160 $password = generate_random_password();160 $password = wp_generate_password(); 161 161 $user_id = wpmu_create_user( $domain, $password, $email ); 162 162 if(false == $user_id) { 163 163 wp_die( __('There was an error creating the user') );