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
This commit is contained in:
Dominik Schilling (ocean90) 2015-08-04 11:38:52 +00:00
parent aaf15cdde8
commit 9f3217c8eb

View File

@ -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 );