Changeset 33988 for trunk/src/wp-admin/user-new.php
- Timestamp:
- 09/10/2015 03:33:22 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-new.php
r33945 r33988 85 85 $redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' ); 86 86 } else { 87 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {87 if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { 88 88 add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) ); 89 89 $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); … … 159 159 */ 160 160 $new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) ); 161 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {161 if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { 162 162 add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email 163 163 add_filter( 'wpmu_welcome_user_notification', '__return_false' ); // Disable welcome email 164 164 } 165 165 wpmu_signup_user( $new_user_login, $new_user_email, array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST['role'] ) ); 166 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {166 if ( isset( $_POST[ 'noconfirmation' ] ) && current_user_can( 'manage_network_users' ) ) { 167 167 $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 ) ); 168 168 wpmu_activate_signup( $key ); … … 340 340 </td> 341 341 </tr> 342 <?php if ( is_super_admin() ) { ?>342 <?php if ( current_user_can( 'manage_network_users' ) ) { ?> 343 343 <tr> 344 344 <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> … … 477 477 </td> 478 478 </tr> 479 <?php if ( is_multisite() && is_super_admin() ) { ?>479 <?php if ( is_multisite() && current_user_can( 'manage_network_users' ) ) { ?> 480 480 <tr> 481 481 <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
Note: See TracChangeset
for help on using the changeset viewer.