r45474 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45473‎ | r45474 | r45475 >
Date:01:19, 7 January 2009
Author:brion
Status:ok
Tags:
Comment:
Fix regression in r45351 "(bug 16044) Vague error message in Special:Emailuser"

Non-existent users and anon addresses were showing "noemail" instead of "notarget" message, since only the invalid name case was now being checked.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialEmailuser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialEmailuser.php
@@ -268,7 +268,7 @@
269269 }
270270
271271 $nu = User::newFromName( $nt->getText() );
272 - if( is_null( $nu ) ) {
 272+ if( is_null( $nu ) || !$nu->getId() ) {
273273 wfDebug( "Target is invalid user.\n" );
274274 return "notarget";
275275 } else if ( !$nu->isEmailConfirmed() ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45351(bug 16044) Vague error message in Special:Emailuseraaron22:14, 2 January 2009

Status & tagging log