Ticket #22277: 22277.patch
File 22277.patch, 2.7 KB (added by , 12 years ago) |
---|
-
wp-admin/user-new.php
68 68 if ( ( $username != null && !is_super_admin( $user_id ) ) && ( array_key_exists($blog_id, get_blogs_of_user($user_id)) ) ) { 69 69 $redirect = add_query_arg( array('update' => 'addexisting'), 'user-new.php' ); 70 70 } else { 71 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin()) {71 if ( isset( $_POST[ 'noconfirmation' ] ) ) { 72 72 add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) ); 73 73 $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); 74 74 } else { … … 118 118 $add_user_errors = $user_details[ 'errors' ]; 119 119 } else { 120 120 $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true)); 121 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin()) {121 if ( isset( $_POST[ 'noconfirmation' ] ) ) { 122 122 add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email 123 123 } 124 124 wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ); 125 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin()) {125 if ( isset( $_POST[ 'noconfirmation' ] ) ) { 126 126 $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) ); 127 127 wpmu_activate_signup( $key ); 128 128 $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); … … 283 283 </select> 284 284 </td> 285 285 </tr> 286 <?php if ( is_super_admin() ) { ?>287 286 <tr> 288 287 <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> 289 288 <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td> 290 289 </tr> 291 <?php } ?>292 290 </table> 293 291 <?php submit_button( __( 'Add Existing User '), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?> 294 292 </form> … … 367 365 </select> 368 366 </td> 369 367 </tr> 370 <?php if ( is_multisite() && is_super_admin()) { ?>368 <?php if ( is_multisite() ) { ?> 371 369 <tr> 372 370 <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> 373 371 <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 them a confirmation email.' ); ?></label></td>