From: Mark A. Hershberger Date: Fri, 16 Dec 2011 17:19:45 +0000 (+0000) Subject: followup r103467 - Make sure we pass a user object when we call LoginAuthenticateAudi... X-Git-Tag: 1.31.0-rc.0~25936 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=37988ed5c34a876f560964aaeaff5a9762e13480;p=lhc%2Fweb%2Fwiklou.git followup r103467 - Make sure we pass a user object when we call LoginAuthenticateAudit with self::ILLEGAL --- 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; }