X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUserlogin.php;h=8ca309586f895ccad0d6248503597df2e9fb63c7;hb=37988ed5c34a876f560964aaeaff5a9762e13480;hp=7bf3b7554897c5e05a14a5438cc9bbf32b5174d4;hpb=1b46e91efdb021d7e3522d150b8a68f34e609232;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 7bf3b75548..8ca309586f 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -524,7 +524,11 @@ class LoginForm extends SpecialPage { # TODO: Allow some magic here for invalid external names, e.g., let the # user choose a different wiki name. $u = User::newFromName( $this->mUsername ); - if( !( $u instanceof User ) || !User::isUsableName( $u->getName() ) ) { + if( !( $u instanceof User ) ) { + wfRunHooks( 'LoginAuthenticateAudit', array( new User, $this->mPassword, self::ILLEGAL ) ); + return self::ILLEGAL; + } + if( !User::isUsableName( $u->getName() ) ) { wfRunHooks( 'LoginAuthenticateAudit', array( $u, $this->mPassword, self::ILLEGAL ) ); return self::ILLEGAL; }