Index: trunk/phase3/includes/SpecialEmailuser.php |
— | — | @@ -13,8 +13,13 @@ |
14 | 14 | $target = isset($par) ? $par : $wgRequest->getVal( 'target' ); |
15 | 15 | $error = EmailUserForm::getPermissionsError( $target ); |
16 | 16 | if ( $error ) { |
17 | | - $wgOut->showErrorPage( $error[0], $error[1] ); |
18 | | - return; |
| 17 | + if ( $error[0] === "blockedemailuser" ) { |
| 18 | + $wgOut->blockedPage(); |
| 19 | + return; |
| 20 | + } else { |
| 21 | + $wgOut->showErrorPage( $error[0], $error[1] ); |
| 22 | + return; |
| 23 | + } |
19 | 24 | } |
20 | 25 | |
21 | 26 | $form = EmailUserForm::newFromURL( $target, |
— | — | @@ -220,6 +225,11 @@ |
221 | 226 | wfDebug( "User can't send.\n" ); |
222 | 227 | return array( "mailnologin", "mailnologintext" ); |
223 | 228 | } |
| 229 | + |
| 230 | + if( $wgUser->isBlockedFromEmailuser() ) { |
| 231 | + wfDebug( "User is blocked from sending e-mail.\n" ); |
| 232 | + return array( "blockedemailuser", "" ); |
| 233 | + } |
224 | 234 | |
225 | 235 | if ( "" == $target ) { |
226 | 236 | wfDebug( "Target is empty.\n" ); |