}
}
+ /**
+ * Whether the password is currently invalid
+ * @since 1.32
+ * @return bool
+ */
+ public function isInvalid() {
+ return $this->getPassword() instanceof InvalidPassword;
+ }
+
/**
* Save the BotPassword to the database
* @param string $operation 'update' or 'insert'
}
// Check the password
- if ( !$bp->getPassword()->equals( $password ) ) {
+ $passwordObj = $bp->getPassword();
+ if ( $passwordObj instanceof InvalidPassword ) {
+ return Status::newFatal( 'botpasswords-needs-reset', $name, $appId );
+ }
+ if ( !$passwordObj->equals( $password ) ) {
return Status::newFatal( 'wrongpassword' );
}