diff --git wp-admin/user-new.php wp-admin/user-new.php
index 38b78dd..bde57ab 100644
|
|
Please click the following link to confirm the invite: |
144 | 144 | add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email |
145 | 145 | add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email |
146 | 146 | } |
147 | | wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST['role'] ) ); |
| 147 | $first_name = ( isset( $_REQUEST['first_name'] ) && ! empty( $_REQUEST['first_name'] ) ) ? sanitize_text_field( $_REQUEST['first_name'] ) : ''; |
| 148 | $last_name = ( isset( $_REQUEST['last_name'] ) && ! empty( $_REQUEST['last_name'] ) ) ? sanitize_text_field( $_REQUEST['last_name'] ) : ''; |
| 149 | wpmu_signup_user( $new_user_login, $new_user_email, array( |
| 150 | 'add_to_blog' => $wpdb->blogid, |
| 151 | 'new_role' => $_REQUEST['role'], |
| 152 | 'first_name' => $first_name, |
| 153 | 'last_name' => $last_name, |
| 154 | )); |
148 | 155 | if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { |
149 | 156 | $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $new_user_email ) ); |
150 | 157 | $new_user = wpmu_activate_signup( $key ); |
… |
… |
$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unsl |
399 | 406 | <th scope="row"><label for="email"><?php _e('Email'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th> |
400 | 407 | <td><input name="email" type="email" id="email" value="<?php echo esc_attr( $new_user_email ); ?>" /></td> |
401 | 408 | </tr> |
402 | | <?php if ( !is_multisite() ) { ?> |
403 | 409 | <tr class="form-field"> |
404 | 410 | <th scope="row"><label for="first_name"><?php _e('First Name') ?> </label></th> |
405 | | <td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr($new_user_firstname); ?>" /></td> |
| 411 | <td><input name="first_name" type="text" id="first_name" value="<?php echo esc_attr( $new_user_firstname ); ?>" /></td> |
406 | 412 | </tr> |
407 | 413 | <tr class="form-field"> |
408 | 414 | <th scope="row"><label for="last_name"><?php _e('Last Name') ?> </label></th> |
409 | | <td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr($new_user_lastname); ?>" /></td> |
| 415 | <td><input name="last_name" type="text" id="last_name" value="<?php echo esc_attr( $new_user_lastname ); ?>" /></td> |
410 | 416 | </tr> |
| 417 | <?php if ( ! is_multisite() ) { ?> |
411 | 418 | <tr class="form-field"> |
412 | 419 | <th scope="row"><label for="url"><?php _e('Website') ?></label></th> |
413 | 420 | <td><input name="url" type="url" id="url" class="code" value="<?php echo esc_attr( $new_user_uri ); ?>" /></td> |
diff --git wp-includes/ms-functions.php wp-includes/ms-functions.php
index ca81761..c119bc8 100644
|
|
function wpmu_activate_signup($key) { |
988 | 988 | if ( isset( $user_already_exists ) ) |
989 | 989 | return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup); |
990 | 990 | |
| 991 | if ( ! empty( $meta['first_name'] ) ) { |
| 992 | update_user_meta( $user_id, 'first_name', $meta['first_name'] ); |
| 993 | } |
| 994 | |
| 995 | if ( ! empty( $meta['last_name'] ) ) { |
| 996 | update_user_meta( $user_id, 'last_name', $meta['last_name'] ); |
| 997 | } |
| 998 | |
991 | 999 | /** |
992 | 1000 | * Fires immediately after a new user is activated. |
993 | 1001 | * |