From 9f3217c8ebcdf2d42c809df67d7bdb94d69505af Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 4 Aug 2015 11:38:52 +0000 Subject: [PATCH] Multisite mails: Initialize `$current_user` before accessing `$current_user->user_login`. props Toro_Unit. see #31217. fixes #33254. git-svn-id: https://develop.svn.wordpress.org/trunk@33569 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index 8c6aa48bba..ffed184b21 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -298,6 +298,7 @@ All at ###SITENAME### */ $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); + $current_user = wp_get_current_user(); $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( admin_url( 'options.php?adminhash='.$hash ) ), $content ); $content = str_replace( '###EMAIL###', $value, $content );