Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#16053 closed defect (bug) (fixed)

Back to Authors and Users link redirects to the wrong screen

Reported by: PeteMall Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch commit
Focuses: multisite Cc:


When you edit a user from network admin site-users screen, the "← Back to Authors and Users" link redirects the user to the network/users.php instead of network/site-users.php?id=x

Attachments (4)

16053.diff (1.6 KB) - added by PeteMall 5 years ago.
16053.2.diff (1.6 KB) - added by PeteMall 5 years ago.
16053.3.diff (2.5 KB) - added by SergeyBiryukov 5 years ago.
16053.4.diff (2.9 KB) - added by nacin 5 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 @SergeyBiryukov5 years ago

Also, after editing a user on network/users.php the referer is empty:


@PeteMall5 years ago

@PeteMall5 years ago

comment:2 @garyc405 years ago

  • Keywords has-patch needs-testing added

@SergeyBiryukov5 years ago

comment:3 @SergeyBiryukov5 years ago

Fixed empty referer.

comment:4 @nacin5 years ago

Looks good.

@nacin5 years ago

comment:5 @nacin5 years ago

  • Keywords commit added; needs-testing removed

Final patch works for me. Modified the URL generation a bit -- network_admin_url() and full esc_url() -- and in user-edit, we're now only adding the wp_http_referer argument if there is one, preventing a URL that looks like:


Tested every way possible. Offering commit.

comment:6 @nacin5 years ago

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

(In [17201]) Allow us to return from whence we came. Specify wp_http_referer for user-edit in the network admin, as we may come from network/users or site-users. props PeteMall, SergeyBiryukov, fixes #16053.

Note: See TracTickets for help on using tickets.