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" );