diff options
Diffstat (limited to 'wp-admin/user-edit.php')
-rw-r--r-- | wp-admin/user-edit.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index bbb321a..0ab9aec 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -12,9 +12,10 @@ require_once __DIR__ . '/admin.php'; /** WordPress Translation Installation API */ require_once ABSPATH . 'wp-admin/includes/translation-install.php'; -wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) ); +$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : ''; +$user_id = ! empty( $_REQUEST['user_id'] ) ? absint( $_REQUEST['user_id'] ) : 0; +$wp_http_referer = ! empty( $_REQUEST['wp_http_referer'] ) ? sanitize_text_field( $_REQUEST['wp_http_referer'] ) : ''; -$user_id = (int) $user_id; $current_user = wp_get_current_user(); if ( ! defined( 'IS_PROFILE_PAGE' ) ) { @@ -437,7 +438,7 @@ switch ( $action ) { <table class="form-table" role="presentation"> <tr class="user-user-login-wrap"> <th><label for="user_login"><?php _e( 'Username' ); ?></label></th> - <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> + <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> </tr> <?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profile_user->ID ) ) : ?> |