From 683bba1b2db4b7d1066509852d4a8b4e18915af4 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 21 Feb 2023 15:53:10 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@55396 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 96f9edfe04..236c15f4c1 100644 --- a/src/wp-includes/user.php +++ b/src/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 );