Ticket #40046: pass_length.patch
File pass_length.patch, 893 bytes (added by , 4 years ago) |
---|
-
wp-includes/user.php
2335 2335 if ( $errors->get_error_code() ) 2336 2336 return $errors; 2337 2337 2338 $user_pass = wp_generate_password( 12, false ); 2338 /** 2339 * Filters the password length of a user being registered. 2340 * 2341 * @param int $pass_length the password length. 2342 */ 2343 $length = apply_filters( 'user_password_length', $length = 12 ); 2344 2345 $user_pass = wp_generate_password( $length, false ); 2339 2346 $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email ); 2340 2347 if ( ! $user_id || is_wp_error( $user_id ) ) { 2341 2348 $errors->add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );