Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#5736 closed defect (bug) (fixed)

Merge profile.php and user-edit.php

Reported by: nbachiyski's profile nbachiyski Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:


Inspired by #5508, this patch tries to merge wp-admin/profile.php and wp-admin/user-edit.php, since these files contain much common code.

Some details:

  • Both files are retained in order all old links to work. profile.php is almost empty and just sets a variable and loads user-edit.php
  • Password strength meter and pluggable personal options are still available only on the profile page.
  • The capability system was modified (with great help from Ryan) so that current_user_can('edit_user', $uid) returns true if the current user has id $uid

Attachments (1)

merge-profile-user-edit.diff (22.5 KB) - added by nbachiyski 15 years ago.

Download all attachments as: .zip

Change History (11)

#1 @darkdragon
15 years ago

That is a pretty sweet patch. I'll see about testing it over the weekend. If at all possible, can you move the function outside of the file into another file in the wp-admin/includes folder?

I think the goal is to have as much separate of presentation and business logic as possible. Just a suggestion, if you want to spend time doing it.

#2 @nbachiyski
15 years ago

This one function is presentation-oriented and isn't used anywhere else, so it would better stay there.

#3 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6697]) Merge user-edit.php and profile.php. Props nbachiyski. fixes #5736

#4 @ryan
15 years ago

(In [6699]) Define parent_file and submenu_file after admin.php is loaded. see #5736

#5 @ryan
15 years ago

(In [6700]) Fix profile submenu highlight. Make is_profile_page a constant so that register globals can't manipulate it. see #5736

#6 @nbachiyski
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

profile-update.php is no longer needed -- all the work is done in user-edit.php

#7 @jopa
15 years ago

with this patch the bug #5508 will be fixed? or its just a patch for merging the profile and user-edit php files?


#8 @ryan
15 years ago

(In [6703]) profile-update.php no longer needed. see #5736

#9 @ryan
15 years ago

yes, #5508 is fixed

#10 @westi
15 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Closing as fixed as I can't see anything left to do here.

Note: See TracTickets for help on using tickets.