X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmail%2FEmailNotification.php;h=0b77651bdace4a881aea6924a6404185d781cc2c;hb=e86a060284e8ade65ca1e358b0b449fd0c0d9559;hp=acf2c2e44644f1e538b5da7e411e7b201ae50ca4;hpb=044d888c41427967cd6f14303d300ceefa54d0c5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php index acf2c2e446..0b77651bda 100644 --- a/includes/mail/EmailNotification.php +++ b/includes/mail/EmailNotification.php @@ -224,7 +224,9 @@ class EmailNotification { && $watchingUser->isEmailConfirmed() && $watchingUser->getId() != $userTalkId && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges ) - && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() ) + // @TODO Partial blocks should not prevent the user from logging in. + // see: https://phabricator.wikimedia.org/T208895 + && !( $wgBlockDisablesLogin && $watchingUser->getBlock() ) && Hooks::run( 'SendWatchlistEmailNotification', [ $watchingUser, $title, $this ] ) ) { $this->compose( $watchingUser, self::WATCHLIST ); @@ -262,7 +264,9 @@ class EmailNotification { wfDebug( __METHOD__ . ": user talk page edited, but user does not exist\n" ); } elseif ( $targetUser->getId() == $editor->getId() ) { wfDebug( __METHOD__ . ": user edited their own talk page, no notification sent\n" ); - } elseif ( $wgBlockDisablesLogin && $targetUser->isBlocked() ) { + } elseif ( $wgBlockDisablesLogin && $targetUser->getBlock() ) { + // @TODO Partial blocks should not prevent the user from logging in. + // see: https://phabricator.wikimedia.org/T208895 wfDebug( __METHOD__ . ": talk page owner is blocked and cannot login, no notification sent\n" ); } elseif ( $targetUser->getOption( 'enotifusertalkpages' ) && ( !$minorEdit || $targetUser->getOption( 'enotifminoredits' ) )