Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -268,9 +268,15 @@ |
269 | 269 | } |
270 | 270 | |
271 | 271 | $nu = User::newFromName( $nt->getText() ); |
272 | | - if( is_null( $nu ) || !$nu->canReceiveEmail() ) { |
273 | | - wfDebug( "Target is invalid user or can't receive.\n" ); |
| 272 | + if( is_null( $nu ) ) { |
| 273 | + wfDebug( "Target is invalid user.\n" ); |
| 274 | + return "notarget"; |
| 275 | + } else if ( !$nu->isEmailConfirmed() ) { |
| 276 | + wfDebug( "User has no valid email.\n" ); |
274 | 277 | return "noemail"; |
| 278 | + } else if ( !$nu->canReceiveEmail() ) { |
| 279 | + wfDebug( "User does not allow user emails.\n" ); |
| 280 | + return "nowikiemail"; |
275 | 281 | } |
276 | 282 | |
277 | 283 | return $nu; |