summaryrefslogtreecommitdiffstats
path: root/wp-admin/user-edit.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/user-edit.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream.tar.xz
wordpress-upstream.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-admin/user-edit.php7
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 ) ) : ?>