[wp-trac] [WordPress Trac] #47064: Missing "user_id" parameter in user-edit.php form (was: User Profile)
WordPress Trac
noreply at wordpress.org
Fri Jun 20 07:24:17 UTC 2025
#47064: Missing "user_id" parameter in user-edit.php form
--------------------------+------------------------------
Reporter: jdan21 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 0.71
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Changes (by juliobox):
* version: 5.1.1 => 0.71
Comment:
The issue is there since dinosaurs, I mean since b2 in profile.php file.
The form action parameter is missing the user_id, so you cannot reload the
page once submitted. You can submit it again and again since the parameter
lies in a hidden input field, but reloading is not allowed.
The patch should just be to add the user_id at the right place, that's it.
Could be a nice first patch ;)
{{{#!php
<?php
if ( IS_PROFILE_PAGE ) {
$edit_url = esc_url( self_admin_url(
'profile.php' ) );
} else {
$edit_url = add_query_arg( 'user_id',
$user_id, esc_url( self_admin_url( 'user-edit.php' ) ) );
}
?>
<form id="your-profile" action="<?php echo
$edit_url; ?>" method="post" novalidate="novalidate"
<?php
unset( $edit_url );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47064#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list