Make WordPress Core

Ticket #60774: 60774.diff

File 60774.diff, 1.0 KB (added by roytanck, 11 months ago)

Patch that makes the user_login field readonly instead of disabled.

  • src/wp-admin/user-edit.php

     
    437437                                <table class="form-table" role="presentation">
    438438                                        <tr class="user-user-login-wrap">
    439439                                                <th><label for="user_login"><?php _e( 'Username' ); ?></label></th>
    440                                                 <td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profile_user->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
     440                                                <td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profile_user->user_login ); ?>" readonly="readonly" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
    441441                                        </tr>
    442442
    443443                                        <?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profile_user->ID ) ) : ?>