diff --git wp-admin/user-new.php wp-admin/user-new.php
index 6134373..475d183 100644
|
|
if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) { |
65 | 65 | if ( ( $username != null && !is_super_admin( $user_id ) ) && ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) ) { |
66 | 66 | $redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' ); |
67 | 67 | } else { |
68 | | if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { |
| 68 | if ( isset( $_POST[ 'noconfirmation' ] ) ) { |
69 | 69 | add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) ); |
70 | 70 | $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); |
71 | 71 | } else { |
… |
… |
Please click the following link to confirm the invite: |
122 | 122 | * @param string $user_login The sanitized username. |
123 | 123 | */ |
124 | 124 | $new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) ); |
125 | | if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { |
| 125 | if ( isset( $_POST[ 'noconfirmation' ] ) ) { |
126 | 126 | add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email |
127 | 127 | add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email |
128 | 128 | } |
129 | 129 | wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST['role'] ) ); |
130 | | if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { |
| 130 | if ( isset( $_POST[ 'noconfirmation' ] ) ) { |
131 | 131 | $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 ) ); |
132 | 132 | wpmu_activate_signup( $key ); |
133 | 133 | $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); |
… |
… |
if ( is_multisite() ) { |
303 | 303 | </select> |
304 | 304 | </td> |
305 | 305 | </tr> |
306 | | <?php if ( is_super_admin() ) { ?> |
307 | 306 | <tr> |
308 | 307 | <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> |
309 | 308 | <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td> |
310 | 309 | </tr> |
311 | | <?php } ?> |
312 | 310 | </table> |
313 | 311 | <?php |
314 | 312 | /** |
… |
… |
if ( apply_filters( 'show_password_fields', true ) ) : ?> |
416 | 414 | </select> |
417 | 415 | </td> |
418 | 416 | </tr> |
419 | | <?php if ( is_multisite() && is_super_admin() ) { ?> |
| 417 | <?php if ( is_multisite() ) { ?> |
420 | 418 | <tr> |
421 | 419 | <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> |
422 | 420 | <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label></td> |