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