49 if ( isset( $params[
'blockDisablesLogin'] ) ) {
50 $this->blockDisablesLogin = (bool)$params[
'blockDisablesLogin'];
66 if ( !$this->blockDisablesLogin ) {
69 $block = $user->getBlock();
72 if ( $block && $block->isSitewide() && $block->isBlocking( $user ) ) {
74 new \
Message(
'login-userblocked', [ $user->getName() ] )
91 'local-createaccount' => $user->isBlockedFromCreateAccount(),
92 'local' => $user->getBlock(),
94 foreach ( $blocks as $block ) {
96 if ( $block && $block->isSitewide()
100 && ( $block->isBlocking( $user ) || $autocreate )
104 $block->isCreateAccountBlocked()
108 || ( $autocreate && $this->blockDisablesLogin )
121 $language = $context->getUser()->isSafeToLoad() ?
125 $ip = $context->getRequest()->getIP();
128 $formatter->getMessage( $block, $user, $language, $ip )
A class containing constants representing the names of configuration variables.
const BlockDisablesLogin
Name constant for the BlockDisablesLogin setting, for use with Config::get()
The Message class deals with fetching and processing of interface message into a variety of formats.
static getMain()
Get the RequestContext object associated with the main request.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
static newFatal( $message,... $parameters)
Factory function for fatal errors.
static newGood( $value=null)
Factory function for good results.