Skip to content

Commit

Permalink
Fix checking blocker instead of target
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Sep 21, 2024
1 parent dcf116b commit 3a85a33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/HookHandlers/SpamEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 3a85a33

Please sign in to comment.