Ticket #33504: 33504.diff
File 33504.diff, 1.7 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/user.php
176 176 $user_id = wp_update_user( $user ); 177 177 } else { 178 178 $user_id = wp_insert_user( $user ); 179 wp_new_user_notification( $user_id, 'both' );179 wp_new_user_notification( $user_id, isset( $_POST['no_new_user_email'] ) ? 'admin' : 'both' ); 180 180 } 181 181 return $user_id; 182 182 } -
wp-admin/user-new.php
355 355 $new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; 356 356 $new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : ''; 357 357 $new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : ''; 358 $n ew_user_send_password = $creating && isset( $_POST['send_password'] ) ? wp_unslash( $_POST['send_password'] ) : true;358 $no_new_user_email = $creating && isset( $_POST['no_new_user_email'] ) ? true : false; 359 359 $new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : ''; 360 360 361 361 ?> … … 432 432 </label> 433 433 </td> 434 434 </tr> 435 <tr> 436 <th scope="row"><label for="no_new_user_email"><?php _e('') ?></label></th> 437 <td><label for="no_new_user_email"><input type="checkbox" name="no_new_user_email" id="no_new_user_email" value="admin" <?php checked( $no_new_user_email ); ?> /> <?php _e('Do not send the user an email to set a password.'); ?></label></td> 438 </tr> 435 439 <?php endif; ?> 436 440 <?php } // !is_multisite ?> 437 441 <tr class="form-field">