Ticket #21728: 21728.patch
File 21728.patch, 4.8 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/ms.php
222 222 223 223 if ( $current_user->user_email != $_POST['email'] ) { 224 224 if ( !is_email( $_POST['email'] ) ) { 225 $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e -mail address isn't correct." ), array( 'form-field' => 'email' ) );225 $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address isn’t correct." ), array( 'form-field' => 'email' ) ); 226 226 return; 227 227 } 228 228 229 229 if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) { 230 $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e -mail address is already used." ), array( 'form-field' => 'email' ) );230 $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address is already used." ), array( 'form-field' => 'email' ) ); 231 231 delete_option( $current_user->ID . '_new_email' ); 232 232 return; 233 233 } -
wp-admin/includes/user.php
144 144 if ( empty( $user->user_email ) ) { 145 145 $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); 146 146 } elseif ( !is_email( $user->user_email ) ) { 147 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e -mail address isn’t correct.' ), array( 'form-field' => 'email' ) );147 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); 148 148 } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) { 149 149 $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); 150 150 } -
wp-includes/ms-functions.php
182 182 183 183 if ( ! $user ) { 184 184 restore_current_blog(); 185 return new WP_Error( 'user_does_not_exist', __('That user does not exist.'));185 return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) ); 186 186 } 187 187 188 188 if ( !get_user_meta($user_id, 'primary_blog', true) ) { … … 462 462 $errors->add('user_name', __('Sorry, usernames must have letters too!')); 463 463 464 464 if ( !is_email( $user_email ) ) 465 $errors->add('user_email', __( 'Please enter a correctemail address.' ) );465 $errors->add('user_email', __( 'Please enter a valid email address.' ) ); 466 466 467 467 $limited_email_domains = get_site_option( 'limited_email_domains' ); 468 468 if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { … … 553 553 $errors->add('blogname', __( 'Please enter a site name.' ) ); 554 554 555 555 if ( preg_match( '/[^a-z0-9]+/', $blogname ) ) 556 $errors->add('blogname', __( 'Only lowercase letters and numbersallowed.' ) );556 $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) ); 557 557 558 558 if ( in_array( $blogname, $illegal_names ) == true ) 559 559 $errors->add('blogname', __( 'That name is not allowed.' ) ); … … 590 590 $path = $base.$blogname.'/'; 591 591 } 592 592 if ( domain_exists($mydomain, $path) ) 593 $errors->add( 'blogname', __('Sorry, that site already exists!'));593 $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) ); 594 594 595 595 if ( username_exists( $blogname ) ) { 596 596 if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) ) … … 956 956 957 957 // Check if the domain has been used already. We should return an error message. 958 958 if ( domain_exists($domain, $path, $site_id) ) 959 return new WP_Error( 'blog_taken', __('Site already exists.'));959 return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) ); 960 960 961 961 if ( !defined('WP_INSTALLING') ) 962 962 define( 'WP_INSTALLING', true ); -
wp-login.php
309 309 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 310 310 $sanitized_user_login = ''; 311 311 } elseif ( username_exists( $sanitized_user_login ) ) { 312 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered , please choose another one.' ) );312 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) ); 313 313 } 314 314 315 315 // Check the e-mail address