Make WordPress Core

Changeset 55396


Ignore:
Timestamp:
02/21/2023 03:53:10 PM (21 months ago)
Author:
audrasjb
Message:

Users: Fix confirmation link for multisite users with no role.

This fixes a regression introduced in [41163], where the link in change confirmation emails for users with no roles in a multisite install was incorrect, causing them to be unable to change their email address. This changeset replaces admin_url() with self_admin_url() to restore the previous fix.

Follow-up to [38876], [40632], [41165], [41163].

Props roytanck, SergeyBiryukov, johnbillion, afrin29.
Fixes #57164.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r55360 r55396  
    37353735
    37363736        $content = str_replace( '###USERNAME###', $current_user->user_login, $content );
    3737         $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
     3737        $content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
    37383738        $content = str_replace( '###EMAIL###', $_POST['email'], $content );
    37393739        $content = str_replace( '###SITENAME###', $sitename, $content );
Note: See TracChangeset for help on using the changeset viewer.