mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-25 17:51:27 +01:00
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:
parent
df725c13c0
commit
36d32c0504
@ -1740,7 +1740,7 @@ function fix_phpmailer_messageid( $phpmailer ) {
|
|||||||
*/
|
*/
|
||||||
function is_user_spammy( $username = 0 ) {
|
function is_user_spammy( $username = 0 ) {
|
||||||
if ( $username == 0 ) {
|
if ( $username == 0 ) {
|
||||||
$user = get_user_by( 'id', get_current_user_id() );
|
$user = wp_get_current_user();
|
||||||
} else {
|
} else {
|
||||||
$user = get_user_by( 'login', $username );
|
$user = get_user_by( 'login', $username );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user