diff --git a/includes/HookHandlers/SpamEmail.php b/includes/HookHandlers/SpamEmail.php index d4a8dbc..d11f5b4 100644 --- a/includes/HookHandlers/SpamEmail.php +++ b/includes/HookHandlers/SpamEmail.php @@ -69,9 +69,13 @@ static function ( $block ) { if ( wfTimestampNow() > $block->getExpiry() ) { return null; } - $id = $block->getBlocker(); - if ( $id ) { - return User::newFromIdentity( $id )->getEmail(); + $target = $block->getTargetUserIdentity(); + if ( $target == null ) { + return null; + } + $target = User::newFromIdentity( $target ); + if ( $target ) { + return $target->getEmail(); } return null; },