namespace MediaWiki\Auth;
use Config;
+use MediaWiki\Block\DatabaseBlock;
use StatusValue;
/**
}
public function beginSecondaryAuthentication( $user, array $reqs ) {
+ // @TODO Partial blocks should not prevent the user from logging in.
+ // see: https://phabricator.wikimedia.org/T208895
if ( !$this->blockDisablesLogin ) {
return AuthenticationResponse::newAbstain();
- } elseif ( $user->isBlocked() ) {
+ } elseif ( $user->getBlock() ) {
return AuthenticationResponse::newFail(
new \Message( 'login-userblocked', [ $user->getName() ] )
);
$block->getByName()
];
- if ( $block->getType() === \Block::TYPE_RANGE ) {
+ if ( $block->getType() === DatabaseBlock::TYPE_RANGE ) {
$errorMessage = 'cantcreateaccount-range-text';
$errorParams[] = $this->manager->getRequest()->getIP();
} else {