return PasswordFactory::newInvalidPassword();
}
- $passwordFactory = new \PasswordFactory();
- $passwordFactory->init( \RequestContext::getMain()->getConfig() );
+ $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
try {
return $passwordFactory->newFromCiphertext( $password );
} catch ( PasswordError $ex ) {
return Status::newFatal( 'nosuchuser', $name );
}
+ if ( $user->isLocked() ) {
+ return Status::newFatal( 'botpasswords-locked' );
+ }
+
// Throttle
$throttle = null;
if ( !empty( $wgPasswordAttemptThrottle ) ) {