Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -524,7 +524,11 @@ |
525 | 525 | # TODO: Allow some magic here for invalid external names, e.g., let the |
526 | 526 | # user choose a different wiki name. |
527 | 527 | $u = User::newFromName( $this->mUsername ); |
528 | | - if( !( $u instanceof User ) || !User::isUsableName( $u->getName() ) ) { |
| 528 | + if( !( $u instanceof User ) ) { |
| 529 | + wfRunHooks( 'LoginAuthenticateAudit', array( new User, $this->mPassword, self::ILLEGAL ) ); |
| 530 | + return self::ILLEGAL; |
| 531 | + } |
| 532 | + if( !User::isUsableName( $u->getName() ) ) { |
529 | 533 | wfRunHooks( 'LoginAuthenticateAudit', array( $u, $this->mPassword, self::ILLEGAL ) ); |
530 | 534 | return self::ILLEGAL; |
531 | 535 | } |