From 57d8df8ab1fa2f9d4728610bb9b71c543de38545 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Tue, 21 Feb 2023 15:55:19 +0000 Subject: [PATCH] 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 --- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 96f9edfe04..236c15f4c1 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0d803efe33..fa4d5fd039 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.