[wp-trac] [WordPress Trac] #35859: get_edit_user_link should always return the edit user link even if the given ID is that of the current user

WordPress Trac noreply at wordpress.org
Mon Feb 22 19:34:51 UTC 2016


#35859: get_edit_user_link should always return the edit user link even if the
given ID is that of the current user
--------------------------+------------------------------
 Reporter:  jancbeck      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:  administration
--------------------------+------------------------------

Comment (by swissspidy):

 `wp-admin/user-edit.php?user_id=<current_user_id>` is equal to `wp-
 admin/profile.php`, so that's not a big deal.

 In `get_edit_user_link()`, `get_edit_profile_url()` is currently used to
 get the URL to the users' profile. This function uses
 `get_dashboard_url()` to get the correct URL based on the user's
 current/active blog on multisite. That means a 1:1 replacement is probably
 not really possible.

 Core uses `get_edit_user_link()` only in a few places: the users list
 tables, the comments template and the edit profile form itself.

 @jancbeck I think for now you should just use `add_query_arg( 'user_id',
 $user->ID, self_admin_url( 'user-edit.php' ) )`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35859#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list