Give to site admin the option to “skip confirmation email” when adding new user

Paste this in your functions.php file:

function my_skip_confirmation_email() {
    if ( is_multisite() && current_user_can( 'create_users' ) ) { ?>

    <table class="form-table">
        <tr>
            <th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
            <td>
                <input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" />
                <label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
            </td>
        </tr>
    </table>
    <?php }
}
add_action( 'user_new_form', 'my_skip_confirmation_email' );

Leave a Comment