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.

Built from https://develop.svn.wordpress.org/trunk@55396


git-svn-id: http://core.svn.wordpress.org/trunk@54929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-02-21 15:55:19 +00:00
parent f579bc0356
commit 57d8df8ab1
2 changed files with 2 additions and 2 deletions

View File

@ -3734,7 +3734,7 @@ All at ###SITENAME###
$content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
$content = str_replace( '###USERNAME###', $current_user->user_login, $content );
$content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
$content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
$content = str_replace( '###EMAIL###', $_POST['email'], $content );
$content = str_replace( '###SITENAME###', $sitename, $content );
$content = str_replace( '###SITEURL###', home_url(), $content );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta2-55395';
$wp_version = '6.2-beta2-55396';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.