45 if ( isset( $params[
'blockDisablesLogin'] ) ) {
46 $this->blockDisablesLogin = (bool)$params[
'blockDisablesLogin'];
53 if ( $this->blockDisablesLogin ===
null ) {
54 $this->blockDisablesLogin = $this->config->get(
'BlockDisablesLogin' );
65 if ( !$this->blockDisablesLogin ) {
67 } elseif ( $user->getBlock() ) {
69 new \
Message(
'login-userblocked', [ $user->getName() ] )
81 $block = $user->isBlockedFromCreateAccount();
83 if ( $block->getReason() ) {
84 $reason = $block->getReason();
86 $msg = \Message::newFromKey(
'blockednoreason' );
87 if ( !\RequestContext::getMain()->
getUser()->isSafeToLoad() ) {
88 $msg->inContentLanguage();
90 $reason = $msg->text();
99 if ( $block->getType() === DatabaseBlock::TYPE_RANGE ) {
100 $errorMessage =
'cantcreateaccount-range-text';
101 $errorParams[] = $this->manager->getRequest()->getIP();
103 $errorMessage =
'cantcreateaccount-text';
106 return StatusValue::newFatal(
107 new \
Message( $errorMessage, $errorParams )
110 return StatusValue::newGood();
The Message class provides methods which fulfil two basic services:
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Interface for configuration instances.