X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEmailuser.php;h=a69406cb8d224888b2539591eae02e82454b9e33;hb=0148939e93a5a314dcadbbce840f116b6bb538b9;hp=085b68d6d82c9965bb45d95337d7fed984ee372c;hpb=5b1dcdc344f5d251120a161637bcb89e01b0f6a4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 085b68d6d8..a69406cb8d 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -231,14 +231,15 @@ class SpecialEmailUser extends UnlistedSpecialPage { return 'usermaildisabled'; } - if ( !$user->isAllowed( 'sendemail' ) ) { - return 'badaccess'; - } - + // Run this before $user->isAllowed, to show appropriate message to anons (T160309) if ( !$user->isEmailConfirmed() ) { return 'mailnologin'; } + if ( !$user->isAllowed( 'sendemail' ) ) { + return 'badaccess'; + } + if ( $user->isBlockedFromEmailuser() ) { wfDebug( "User is blocked from sending e-mail.\n" );