Opened 11 years ago
Closed 11 years ago
#26607 closed defect (bug) (fixed)
Changing the admin color scheme for another user changes your own scheme
Reported by: | TobiasBg | Owned by: | |
---|---|---|---|
Milestone: | 3.8.1 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Administration | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
- Login as an admin.
- Go to example.com/wp-admin/users.php
- Choose to edit a user other than yourself.
- The admin color scheme picker on /wp-admin/user-edit.php will change your admin color scheme, but not that of the edited user.
Reason: admin_color_scheme_picker()
(in /wp-admin/includes/misc.php) always loads the current user's color scheme, and wp_ajax_save_user_color_scheme()
in /wp-admin/includes/ajax-actions.php always sets it for the current user.
Attachments (4)
Change History (18)
#3
@
11 years ago
Hiding the color picker would be a regression for someone, somewhere. WP 3.7 and earlier always showed the Admin Color Scheme when editing other users. How about a proper fix instead?
#4
@
11 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.8.1
Technically appears to be a regression. 26607.2.patch is an attempt at restoring the 3.7 behaviour.
#5
follow-up:
↓ 6
@
11 years ago
user-profile.js has a check if ( user_id === current_user_id ) {
. I guess it is broken? It was designed to prevent previewing *and* saving when viewing something other than your profile.
#6
in reply to:
↑ 5
;
follow-up:
↓ 7
@
11 years ago
Replying to nacin:
user-profile.js has a check
if ( user_id === current_user_id ) {
. I guess it is broken?
Good point, I can't actually reproduce the 4th point of the ticket description.
There's still a change in the behaviour though. In 3.7, you could set a color scheme for a user. In 3.8, you can't. Is that an intended change?
A related issue: when I open another user for editing, the color picker displays my color scheme, not the user's. 26607.3.patch fixes just that.
#7
in reply to:
↑ 6
;
follow-up:
↓ 8
@
11 years ago
Replying to SergeyBiryukov:
There's still a change in the behaviour though. In 3.7, you could set a color scheme for a user. In 3.8, you can't. Is that an intended change?
I recall this as working for me. It doesn't do the XHR but "Save Changes" will let edit_user() do its thing.
#8
in reply to:
↑ 7
@
11 years ago
Replying to nacin:
I recall this as working for me. It doesn't do the XHR but "Save Changes" will let edit_user() do its thing.
Confirmed. Looks like 26607.3.patch is the only thing needed here then.
#9
@
11 years ago
Yep, 26607.3.patch fixes the issue for me. And indeed, the 4th point in the ticket is not accurate. It should have been: "The color scheme picker will show your current color scheme instead of that of the edited user."
I guess we should either hide the color scheme picker on other profiles, or allow to change it for other users.