Use wp_get_current_user(). props nacin. see #23192.

git-svn-id: http://core.svn.wordpress.org/trunk@23432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-02-15 18:13:18 +00:00
parent df725c13c0
commit 36d32c0504
1 changed files with 1 additions and 1 deletions

View File

@ -1740,7 +1740,7 @@ function fix_phpmailer_messageid( $phpmailer ) {
*/
function is_user_spammy( $username = 0 ) {
if ( $username == 0 ) {
$user = get_user_by( 'id', get_current_user_id() );
$user = wp_get_current_user();
} else {
$user = get_user_by( 'login', $username );
}