WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#23146 closed defect (bug) (fixed)

When current user email change requested, pending message shows on every profile edit page

Reported by: bananastalktome Owned by: SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: Cc:

Description

As a superadmin in a multisite environment, if I go to edit my profile and set a new email address I get the "There is a pending change of your email address..." message below the email input field (expected behavior). If I go to edit another users profile I see the same message, including the desired email I set for myself, below the email address input field on this other users profile page (unexpected behavior). The cancel link, if pressed, takes me to my profile (also unexpected behavior).

This appears to be a problem in wp-admin/user-edit.php with the check to display the "Pending email change message" checking to see if a user_option exists for $current_user->ID . '_new_email' but not whether the profile page viewed is actually for the current user in.

Attachments (1)

23146.patch (875 bytes) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
8 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 3.6

Introduced in [14802].

Aside from the lack of user ID check, we compare an array to a string, which doesn't make any sense.

#2 follow-up: @nacin
8 years ago

Good to go.

Sidenote: It would be great if a future ticket addresses why these are options instead of usermeta.

#3 @SergeyBiryukov
8 years ago

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

In 23364:

Only show "There is a pending change of your e-mail..." message on the current user's profile page. fixes #23146.

#4 in reply to: ↑ 2 @SergeyBiryukov
8 years ago

Replying to nacin:

Sidenote: It would be great if a future ticket addresses why these are options instead of usermeta.

Follow-up: #23358

Note: See TracTickets for help on using tickets.